日期:2014-05-20  浏览次数:20643 次

lucene复杂搜索
Field f1=new Field("booknum","12|id=3:2|21311",Field.Store.YES,Field.Index.NOT_ANALYZED);
  Field f2=new Field("booknum","12|id=3:5|21313",Field.Store.YES,Field.Index.NOT_ANALYZED);
  Field f3=new Field("booknum","12|id=3:3|21312",Field.Store.YES,Field.Index.NOT_ANALYZED);
  Field f4=new Field("booknum","12|id=3:8|21315",Field.Store.YES,Field.Index.NOT_ANALYZED);
  Field f5=new Field("booknum","12|id=3:6|21318",Field.Store.YES,Field.Index.NOT_ANALYZED);  
  Field f6=new Field("booknum","12|id=3:7|21316",Field.Store.YES,Field.Index.NOT_ANALYZED);
  Field f7=new Field("booknum","12|id=3:9|21317",Field.Store.YES,Field.Index.NOT_ANALYZED);
  Field f8=new Field("booknum","12|id=3:10|2134",Field.Store.YES,Field.Index.NOT_ANALYZED);  
  Field f9=new Field("booknum","12|id=3:4|21319",Field.Store.YES,Field.Index.NOT_ANALYZED); 

如上建立索引,要求搜索出id=3:2至id=3:8,也就是说搜索出f1,f2,f3,f4,f5,f6,f9,高手解答

------解决方案--------------------
3:8是什么 买看明白你的逻辑啊