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
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 your
documents as something like "STARTMARKER a b c ENDMARKER" and search
using a phrase or span query including the markers.
--
Ian.
On Wed, Feb 11, 2015 at 7:55 AM, wangdong <hrdxwa...@gmail.com> wrote:
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!
---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org
For additional commands, e-mail: java-user-h...@lucene.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org
For additional commands, e-mail: java-user-h...@lucene.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org
For additional commands, e-mail: java-user-h...@lucene.apache.org