Cameron,
Cameron Leach gmail.com> writes:
> I think what you want is for something like this:
>
> "the brown dog" ->
> the brown dog
> brown dog
> dog
>
> If you write your custom analyzer accordingly, to trim terms from the
> beginning and then use the NGramTokenFilter, you should get your rea
L -
I faced the exact same problem you're having. I ended up writing a custom
Analyzer to tokenize the terms the way I wanted. If memory serves me
correctly, the WhitespaceAnalyzer will do this:
"the brown dog" ->
the
brown
dog
I think what you want is for something like this:
"the brown dog" -
Philip Puffinburger tlcdelivers.com> writes:
> We only do the PrefixQuery which is against the keyword field ("brown dog"
> is a single term as is "the brown dog"). We don't have a BooleanQuery
> like you do, but I don't see why it wouldn't work.
>
Ahh. OK, so you probably aren't using a whi
On Jan 5, 2011, at 1:00 PM, L Duperval wrote:
> Philip,
>
> 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 "bro
Ahmet,
Ahmet Arslan yahoo.com> writes:
> So order of search terms are important to you. Since you are constructing your
queries programmatically,
> you can use SpanQuery family.
>
Yes, order is important.
> If you substitute PrefixQuery with SpanRegexQuery, and TermQuery with
SpanTermQuery. An
Philip,
Philip Puffinburger 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
We do something similar with a PrefixQuery. But the way we do it is to use a
Keyword field to use the PrefixQuery against.
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
> I am trying to implement a "progressive search" with
> Lucene. What I mean is that
> something like what Google does: you type a few letters and
> google searches for
> matches as you type. The more letters you enter, the more
> precise your search
> becomes.
>
> I decided to use a prefix query
Hi,
I am trying to implement a "progressive search" with Lucene. What I mean is that
something like what Google does: you type a few letters and google searches for
matches as you type. The more letters you enter, the more precise your search
becomes.
I decided to use a prefix query because other