I can think of another approach - during indexing, capture the word
"aboutus" and index it as "about us" and "aboutus" in the same position.
That way both queries will work. You'd need to write your own TokenFilter,
maybe a SynonymTokenFilter (since this reminds me of "synonyms" usage) that
accept a list of words and their "matching counterparts" ... something along
those lines.

Another thing, which is basically the same, but from the other side -->
check the query string for such words and replace them w/ what you want. So
you can search for "about us" in the query string and replace it w/
"aboutus".

I prefer the first approach since it's much more performing, but is more
complicated than the second one. It will also allow you to handle other
cases like that.

Shai

On Tue, Aug 4, 2009 at 9:20 AM, Anshum <ansh...@gmail.com> wrote:

> Hi Harig,
> What you are trying to do is search for 2 tokens as one. You'd have to
> index
> the url as you want for the token to be searchable. Else you might try a
> wildcard query .
>
> --
> Anshum Gupta
> Naukri Labs!
> http://ai-cafe.blogspot.com
>
> The facts expressed here belong to everybody, the opinions to me. The
> distinction is yours to draw............
>
>
> On Tue, Aug 4, 2009 at 11:02 AM, m.harig <m.ha...@gmail.com> wrote:
>
> >
> > hello all
> >
> >          thanks for lucene............ this is my doubt , am searching
> for
> > a keyword "about us" from my lucene index , am not getting the results
> what
> > i want , since the urls are formed like the below
> >
> >                                http://www........./aboutus/.....abc/
> >                                http://www........./aboutus/.....xyz/
> >                                http://www........./aboutus/.....def/
> >
> >         if i search "aboutus" , the results coming up correctly. Please
> > any1 suggest me how to handle this situation.
> > --
> > View this message in context:
> > http://www.nabble.com/Searching-doubt-tp24802552p24802552.html
> > Sent from the Lucene - Java Users mailing list archive at Nabble.com.
> >
> >
> > ---------------------------------------------------------------------
> > 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