More Like This query is not working.
Hello I am using more like this query .But size of Score Docs i am getting is 0 I found that it In Query Searchedquery = mlt.like(reader1, criteria); query object contain following value boost 1.0 all clauses element data is null I used following code MoreLikeThis mlt = new MoreLikeThis(reader); // mlt.setAnalyzer(analyzer); Reader reader1 = new StringReader(Requirement); Query Searchedquery = mlt.like(reader1, criteria); please guide me.
Doubt Regarding Lucene matchscore
Hi All I am matching and ranking two set of Docs using apache lucene and I passes page hits 1000. But in the result it shows 200 only why? It means that rest 800 are not matched and if so then what we should consider if we are getting 0.00 score for any match . Waiting for reply Thanks Priyanka
Re: Lucene Query Wrong Result for phrase.
Probably because something in the analysis chain is removing the hyphen. Check out the javadocs. Generally you should also make sure you use the same analyzer at index and search time. -- Ian. On Fri, Jul 18, 2014 at 6:52 AM, itisismail it.is.ism...@gmail.com wrote: Hi I have created index with 1 field with simple message like (hello - world) now when I create for search like +body: \hello world\ I should not get any result because I have wrapped my search word in double quotes and does not specify dash(-) between (hello and world) but I am still getting that result.I am using Lucene version 3.0 using snowball analyzer, also use Cosntruct query likeString qry=+body:\hello world\;Query query = new QueryParser(Version.LUCENE_30, body, analyzer).parse(qry);Why lucene is ignoring dash(-) while search is a phrase. -- View this message in context: http://lucene.472066.n3.nabble.com/Lucene-Query-Wrong-Result-for-phrase-tp4147842.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
Re: More Like This query is not working.
You need to supply more info. Tell us what version of lucene you are using and provide a very small completely self-contained example or test case showing exactly what you expect to happen and what is happening instead. -- Ian. On Fri, Jul 18, 2014 at 11:50 AM, Rajendra Rao rajendra@launchship.com wrote: Hello I am using more like this query .But size of Score Docs i am getting is 0 I found that it In Query Searchedquery = mlt.like(reader1, criteria); query object contain following value boost 1.0 all clauses element data is null I used following code MoreLikeThis mlt = new MoreLikeThis(reader); // mlt.setAnalyzer(analyzer); Reader reader1 = new StringReader(Requirement); Query Searchedquery = mlt.like(reader1, criteria); please guide me. - To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org For additional commands, e-mail: java-user-h...@lucene.apache.org
Migration Lucene 3=4: IndexSearcher.setDefaultFieldSortScoring(..)
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 We currently migrate one project to Lucene 4 and noticed that the method IndexSearcher.setDefaultFieldSortScoring(..) disappeared in Lucene 4.0. We can't find something about this in the migration guide. Further, it was never deprecated in Lucene 3, so we didn't find related documentation on it. Also didn't find something in the mailing list. Is it save to just leave it out? We use and display scores also if the result list was sorted by field value, so we set the field sort scoring to true in any case in the past. How can we achieve this now? best Christian -BEGIN PGP SIGNATURE- Version: GnuPG v2.0.19 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iEYEARECAAYFAlPJLJEACgkQ6EqMXq+WZg+V5QCguuA+jsI1aL+xuAcjF5f7+SvH uCwAnisNQtGlQ8H3TMNsj77IM91+NtUR =GhP4 -END PGP SIGNATURE- - To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org For additional commands, e-mail: java-user-h...@lucene.apache.org
Re: Migration Lucene 3=4: IndexSearcher.setDefaultFieldSortScoring(..)
Hi Christian, I found an entry about this in the 4.0-ALPHA “Changes in backwards compatibility policy” section of Lucene’s CHANGES.txt (html version): http://lucene.apache.org/core/4_9_0/changes/Changes.html#v4.0.0-alpha.changes_in_backwards_compatibility_policy: LUCENE-3514: IndexSearcher.setDefaultFieldSortScoring was removed and replaced with per-search control via new expert search methods that take two booleans indicating whether hit scores and max score should be computed. (Mike McCandless) See: http://lucene.apache.org/core/4_9_0/core/org/apache/lucene/search/IndexSearcher.html#search(org.apache.lucene.search.Query,%20org.apache.lucene.search.Filter,%20int,%20org.apache.lucene.search.Sort,%20boolean,%20boolean) Steve On Jul 18, 2014, at 10:17 AM, Christian Reuschling reuschl...@dfki.uni-kl.de wrote: We currently migrate one project to Lucene 4 and noticed that the method IndexSearcher.setDefaultFieldSortScoring(..) disappeared in Lucene 4.0. We can't find something about this in the migration guide. Further, it was never deprecated in Lucene 3, so we didn't find related documentation on it. Also didn't find something in the mailing list. Is it save to just leave it out? We use and display scores also if the result list was sorted by field value, so we set the field sort scoring to true in any case in the past. How can we achieve this now? best Christian - To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org For additional commands, e-mail: java-user-h...@lucene.apache.org
Re: Lucene Query Wrong Result for phrase.
Thanks IanI am using same analyzer for both indexing searching. Problem is either I search hello world or hello-world or hello:world or hello,world in all cases I am getting same result. All of the queries are wrapped in double quotes. Actuall message indexed is hello - world.Also I am using phrasequery. -- View this message in context: http://lucene.472066.n3.nabble.com/Lucene-Query-Wrong-Result-for-phrase-tp4147842p4147906.html Sent from the Lucene - Java Users mailing list archive at Nabble.com.
Re: Lucene Query Wrong Result for phrase.
The standard tokenizer will strip off those escaped quotes at query time. Ditto for the hyphen at index time. Try constructing your own analyzer using the white space tokenizer instead of the standard tokenizer. -- Jack Krupansky -Original Message- From: itisismail Sent: Friday, July 18, 2014 1:52 AM To: java-user@lucene.apache.org Subject: Lucene Query Wrong Result for phrase. Hi I have created index with 1 field with simple message like (hello - world) now when I create for search like +body: \hello world\ I should not get any result because I have wrapped my search word in double quotes and does not specify dash(-) between (hello and world) but I am still getting that result.I am using Lucene version 3.0 using snowball analyzer, also use Cosntruct query likeString qry=+body:\hello world\;Query query = new QueryParser(Version.LUCENE_30, body, analyzer).parse(qry);Why lucene is ignoring dash(-) while search is a phrase. -- View this message in context: http://lucene.472066.n3.nabble.com/Lucene-Query-Wrong-Result-for-phrase-tp4147842.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
Re: Doubt Regarding Lucene matchscore
Provide some more information like lucene version, sample code, parameters involved in indexing and searching. -- Kumaran R On 18-Jul-2014, at 6:52 pm, Priyanka Tufchi priyanka.tuf...@launchship.com wrote: Hi All I am matching and ranking two set of Docs using apache lucene and I passes page hits 1000. But in the result it shows 200 only why? It means that rest 800 are not matched and if so then what we should consider if we are getting 0.00 score for any match . Waiting for reply Thanks Priyanka - To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org For additional commands, e-mail: java-user-h...@lucene.apache.org