Re: search on a field by a single word

2015-02-11 Thread wangdong
thanks a lot for your answer i find the second way may be useful to me. it is new to me and i will try it. thanks andrew 在 2015/2/11 21:39, Ian Lea 写道: If you only ever want to retrieve based on exact match you could index the name field using org.apache.lucene.document.StringField. Do be a

Re: search on a field by a single word

2015-02-11 Thread Ian Lea
If you only ever want to retrieve based on exact match you could index the name field using org.apache.lucene.document.StringField. Do be aware that it is exact: if you do nothing else, a search for "a" will not match "A" or "A ". Or you could so something with start and end markers e.g. index yo

search on a field by a single word

2015-02-10 Thread wangdong
Hi folks I have a question as follows: suppose there are 3 document in field "name": 1) a b c 2) a b 3) a I just want to retrival doc 3) only. I try to use syntax like this: name:"a" but I find it is not correct.is there any way to solve my question. please help me! thanks ahead! --