Lucene: Multi-word phrases as search terms

后端 未结 4 1409
我寻月下人不归
我寻月下人不归 2020-12-03 15:46

I\'m trying to make a searchable phone/local business directory using Apache Lucene.

I have fields for street name, business name, phone number etc. The problem tha

4条回答
  •  -上瘾入骨i
    2020-12-03 16:02

    If you want an exact words match the street, you could set Field "Street" NOT_ANALYZED which will not filter stop word "the".

    doc.add(new Field("Street", "the crescent", Field.Store.YES, Field.Index.Not_Analyzed);
    

提交回复
热议问题