Philip,

Philip Puffinburger <ppuffinburger <at> tlcdelivers.com> writes:
> So if we had a Book like with a title like 'The Brown Dog',  we would end up
with fields in the document like:
> 
> Used for the normal full text searching
> 
> title : the brown dog
> 
> Used for the prefix searching
> 
> titlekeyword : the brown dog
> titlekeyword : brown dog
> 

I also have two fields, one for indexing and another for display. How does the
above affect searching? If you type "brown do" will it find the title correctly
or do you have to type "brown dog" in order to get a match? Would "brown do"
match "The brown horse has a dog" or not? My understanding is that that Lucene
(BTW, I'm using 2.4.1 because it's the latest version to work with Compass)
matches the prefix first, and then combines the matching results with other
clauses as specified.

> So as the user is typing we are looking up using a PrefixQuery against the
titlekeyword field.    We had tried
> things like span queries against the title field before settling on this
approach (we also use this field
> for other things, not just for the PrefixQuery).
> 

That's what I was planning to look at next. Why did you choose not to use this
approach? Is it because of the other things you want to do with those fields or
something about the way the SpanQuery classes work?

If you are at liberty to share part of your code I'd appreciated it.

Thanks,

L






---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org
For additional commands, e-mail: java-user-h...@lucene.apache.org

Reply via email to