示例#1
0
  public static void main(String[] args) throws Exception {
    // IndexOperator.createIndex();
    // IndexOperator.search("num","46001A");
    // IndexOperator.searchList("address:泰力网吧");
    // IndexOperator.searchListIK("东莞");
    IndexOperator.searchListIKWithExp(
        "((name:'体育'||township:'体育'||address:'体育'||eastNew:'体育'||northNew:'体育'||geom:'体育'||phone:'体育'||num:'体育')&&(dataTypeKey:'WANBA'||dataTypeKey:'ADSL')&&(comTypeKey:'CMCC'))");

    //		MapData mdata = new MapData();
    //		mdata.setId(909090);
    //		mdata.setAddress("东莞达到1121东莞系");
    //		IndexOperator.addOrUpdateIndex(mdata);
    //		IndexOperator.addOrUpdateIndex(mdata);
    //		IndexOperator.searchListIKWithExp("id:'909090'");
    //		IndexOperator.deleteIndex(mdata);
    //		IndexOperator.searchListIKWithExp("id:'909090'");
    //		IndexOperator.searchListIKWithExp("address:'东莞达到1121东莞系'");
    //		IndexOperator.searchListIK("东莞达到1121东莞系");
    // IndexOperator.create();
    // IndexOperator.searchList("0769*");

    //		String ikQueryExp = "(id='ABcdRf'  && keyword:'^魔兽中国$')   -name:'张涵 '";
    //		Query result = IKQueryParser.parse(ikQueryExp);
    //		Query result = IKQueryParser.parse("(newsKeyword='---' || newsTitle:'---' ||
    // newsContent:'---') && newsClass='1'");
    //		System.out.println(result);

  }