You write that you index the string under the "url" field. Do you also index
it under "title"? If not, that can explain why title:"Rahul Dravid" does not
work for you.

Also, did you try to look at the index w/ Luke? It will show you what are
the terms in the index.

Another thing which is always good to debug such things is to create a
StandardAnalyzer, then request a tokenStream() from it, passing a
StringReader w/ the text you want to parse. Then just print the tokens
returned.

I've done that, using the version from trunk, w/ Version.2_4, and the tokens
that are extracted are:
(http,0,4,type=<ALPHANUM>)
(en.wikipedia.org,7,23,type=<HOST>)
(wiki,24,28,type=<ALPHANUM>)
(rahul,29,34,type=<ALPHANUM>)
(dravid,35,41,type=<ALPHANUM>)

So:
1) You don't get results for title:"Rahul Dravid" since you index it under
"url" and not "title".
2) url:"wiki/Rahul_Dravid" works, since it looks for a phrase that exists in
the index (look at the last 3 tokens produced by the Analyzer, in the output
above).
3) ur:"<entire string" also works, since you index all of it under the "url"
field.

Does this explain the behavior you see?

Shai

On Sun, Aug 2, 2009 at 1:27 PM, prashant ullegaddi <prashullega...@gmail.com
> wrote:

> Hi,
>
> I've indexed some 50million documents. I've indexed the target URL of each
> document as "url" field by using
> StandardAnalyzer with index.ANALYZED. Suppose, there is a wikipedia page
> with title:"Rahul Dravid" and
> url: http://en.wikipedia.org/wiki/Rahul_Dravid.
>
> But when I search for +title:"Rahul Dravid" +url:"Wikipedia", I'm getting
> no
> results. I get the document(s) when
> I search for url:http://en.wikipedia.org/wiki/Rahul_Dravid or url:"
> en.wikipedia.org/wiki/Rahul_Dravid". I get
> results even when I search for url:"wiki/Rahul_Dravid".
>
> It'd be helpful if somebody can throw some light on this.
>
> -- Prashant.
>

Reply via email to