RE: difference between Luke search and Lucene.Net search?
1/13/2009
You have to make sure you are using the same analyzer in Luke as you used to
create the index
-- George
> -----Original Message-----
> From: Mark Cottman-Fields [mailto:markcf@qpac.com.au]
> Sent: Monday, January 12, 2009 10:10 PM
> To: lucene-net-user@incubator.apache.org
> Subject: RE: difference between Luke search and Lucene.Net search?
>
> After some more testing, it seems the special characters in
> the url are causing problems.
>
> The url field is stored un_tokenized, so the analyzer in use
> shouldn't matter?
>
> And in my original question, "contentlength" and "length"
> were indeed only errors in that post, the actual code
> contains the correct field names.
>
> Thanks for the ideas so far>
> At this point, I've tried using QueryParser.Parse and
> QueryParser.Escape> I've also tried adding quotes around the url:
> url:"http://some.website.com/"
>
> Neither method gives the results I expect.
Is there some way
> to have a look at what luke does to a query under the hood?
>
> -----Original Message-----
> From: Mark Cottman-Fields [mailto:markcf@qpac.com.au]
> Sent: Sunday, January 11, 2009 11:57 PM
> To: lucene-net-user@incubator.apache.org
> Subject: difference between Luke search and Lucene.Net search?
>
> Hi All
>
> I'm currently testing a lucene.net index for a website.
>
> The Luke search utility and my C# code give me different
> results for searchesThere's probably a simple explanation,
> but I can't find it>
> The idea here is to check for changes using the url and the
> content length.
>
> C# code:
>
> (searcher is Lucene.Net.Search.IndexSearcher instance)
>
> public bool IsIndexed(Uri url, int stringcontent) { int
> foundCount = 0; Lucene.Net.Search.BooleanQuery bq = new
> Lucene.Net.Search.BooleanQuery(); bq.Add(new
> Lucene.Net.Search.TermQuery(new Lucene.Net.Index.Term("url",
> "\"" + url.AbsoluteUri + "\"")),
> Lucene.Net.Search.BooleanClause.Occur.MUST);
> bq.Add(new Lucene.Net.Search.TermQuery(new
> Lucene.Net.Index.Term("length", stringcontent.ToString())),
> Lucene.Net.Search.BooleanClause.Occur.MUST);
> Lucene.Net.Search.Hits hits = searcher.Search(bq); foundCount
> = hits.Length(); return foundCount > 0; }
>
> A search like:
> +url:"http://some.website.com/" +contentlength:1234
>
> Finds exactly one item in Luke (the expected behaviour, if
> the url is indexed and has that length exactly), but returns
> nothing in my code above.
They are both using the same index>
> Any ideas?
>
> BTW, great project, thank you!
>
> Mark
>
> ********** Disclaimer **********
> This email, together with any attachments, is intended for
> the named recipient only.
This email may contain information
> which is confidential, of a private nature or which is
> subject to legal professional privilege or copyright
> Accordingly, any form of disclosure, modification,
> distribution and/or publication of this email message is
> prohibited unless expressly authorised by the sender acting
> with the authority of or on behalf of the Queensland
> Performing Arts Centre.
>
> If you have received this email by mistake, please inform the
> sender as soon as possible and delete the message and any
> copies of this message from your computer system networkThe
> confidentiality, privacy or legal professional privilege
> attached to this email is not waived or destroyed by that mistake.
>
> Unless expressly attributed, the views expressed in this
> email do not necessarily represent the views of the
> Queensland Performing Arts Centre> ********************************
>
.
Similar articles
lucene-net-user@incubator.apache.org Archives
RE: difference between Luke search and Lucene.Net search?
After some more testing, it seems the special characters in the url are causing problems. The url field is stored un_tokenized, so the analyzer in use shouldn't matter? And in my original question,...
lucene-net-user@incubator.apache.org Archives
Re: difference between Luke search and Lucene.Net search?
you can use luke to know what is the content of the index, in the overview tab you can select the url field and press on show top terms, so you will get the real terms that are in the index. By the ...
lucene-net-user@incubator.apache.org Archives
RE: difference between Luke search and Lucene.Net search?
In Luke you searched for a field named "contentlength", but in your C# code you searched for a field named "length". If this is not a typographical error in your post, this is the most likely the pr...
lucene-net-user@incubator.apache.org Archives
Re: difference between Luke search and Lucene.Net search?
You don't say what is the analyzer you are using, by default i think that standartanalyzer is used, i think that the same analyzer is being used by luke and your indexer, but as you are creating th...
lucene-net-user@incubator.apache.org Archives
difference between Luke search and Lucene.Net search?
Hi All I'm currently testing a lucene.net index for a website. The Luke search utility and my C# code give me different results for searches. There's probably a simple explanation, but I can't find...
CodeClimber
Lucene.net is powering Subtext 2.5 search
Back in August and September I started a series with the main concepts of Lucene.net and I started to explain the design behind the forthcoming Lucene.net-powered search engine for Subtext. In the las...
Report
Latest from lucene-net-user@incubator.apache.org Archives