lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Steven Rowe <>
Subject Re: Indexing & search?
Date Tue, 06 Mar 2007 16:06:33 GMT
Hi senthil,

senthil kumaran wrote:
>    I've indexed 4 among 5 fields with Field.Store.YES & Field.Index.NO. And
> indexed the remaining one, say it's Field Name is *content*, with
> Field.Store.YES & Field.Index.Tokenized(It's value is collective value of
> other 4 fields and some more values).So my search always based on
> *content*field.
>    I've indexed 2 douments . In 1st doc, f1:mybook, f2:contains, f3:all,
> f4:information, content:mybook contains all information that you need
> and in 2nd   f1:somebody, f2:want, f3:search, f4:information,
> content:somebody want search information of mybook
>    I want to get search results of all docs where field1's value is
> "mybook".My query is content:mybook.But it returns 2 matching documents
> instead of 1.
>    Any filters can i use for this??
>    Is there any possible way other than changing f1 to
> Field.Index.tokenized???Because i want to avoid duplication in index.

Your query is behaving as it should - since the "content" field in both
docs contains "mybook", they both match.

Although you say you want to avoid duplication in the index, I think you
already know what to do (you wrote "I want to get search results of all
docs where field1's value is 'mybook'") - index "field1" to make it
directly queryable.  If the information really needs to be distinct to
query properly, then make it so.

And if the index gets too large, you can try removing the duplication
from the "content" field, and include the other fields in your queries.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message