lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Simon Willnauer" <simon.willna...@googlemail.com>
Subject Re: search for web address
Date Fri, 18 Aug 2006 09:13:14 GMT
If you analyze the url http://www.yahoo.fr with the whitespace
analyzer you will get one single token looking like that 1:
[http://www.yahoo.fr:0->19:word] in an internal representation.

so if you search for yahoo.fr you won't get any hit and you cant use
left hand wildcards as they are not supported. so the query for http*
uses a right hand wildcard and hits the URL you indexed before.

The StandardAnalyzer produces these tokens

1: [http:0->4:<ALPHANUM>]
2: [www.yahoo.fr:7->19:<HOST>]

they would hit all your queries so far. I suggest you create a little
Analyzer helper method shows you the output of an analyzer that shows
you exactly what happens with the analyzed text. don't forget to use
the same analyzer for search as you used for indexing, at least in
this scenario.

best regards Simon

On 8/18/06, ould sid'ahmed <nouldsid@emn.fr> wrote:
> thank you for your response,
> I index an URL, I use WhiteSpaceAnalyzer, but if do a search at this
> URL, it returns me nothings,
> I have an example :
> I index this URL: "http://www.yahoo.fr", If I do a search at the word
> "yahoo.fr", it returns me no result, and if I do the search like
> "http*", it returns me all address indexed
>
> Simon Willnauer a écrit :
> > It's like looking for a needle in a haystack without any sinppets of
> > your code.
> > If you provide some infomation about how you index and search the
> > specific field you will get an answer. :)
> >
> > best regards simon
> >
> > On 8/18/06, ould sid'ahmed <nouldsid@emn.fr> wrote:
> >> Hello,
> >> I indexed my document but, Can I search for an address web,  it returns
> >> me  no result,
> >> and when I search the same address with a query like "http*" it returns
> >> me a result,
> >> can you help me
> >>
> >> thanks
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> >> For additional commands, e-mail: java-user-help@lucene.apache.org
> >>
> >>
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> > For additional commands, e-mail: java-user-help@lucene.apache.org
> >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
>
Mime
View raw message