Re: Boolean Search Query is not workng
How about "home~10 house~10 flat". See http://lucene.apache.org/core/4_10_3/queryparser/index.html -- Ian. On Fri, Jan 23, 2015 at 7:17 AM, Priyanka Tufchi wrote: > Hi ALL > > I am working on a project which uses lucene for searching . I am > struggling with boolean based Query : Actual Scenario is > > e.g > In Query, if I give house home flat > then > inside It should search house or home or flat but I want to give them > with weightage like house and home should get high weigh and flat should > get less then rest. > If document contain "Home" .Lucene search should not go for house and > flat. > > I searched on Internet for some good stuff but not able to find any code > sample or proper syntax for reference . > > > Thanks > Priyanka > > -- > Launchship Technology respects your privacy. This email is intended only > for the use of the party to which it is addressed and may contain > information that is privileged, confidential, or protected by law. If you > have received this message in error, or do not want to receive any further > emails from us, please notify us immediately by replying to the message and > deleting it from your computer. - To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org For additional commands, e-mail: java-user-h...@lucene.apache.org
Re: Boolean Search Query is not workng
Hi Ian I tried with what u sent Query-java~5 jakarta~5 apache tomcat Document : "1", "java jakarta tomcat" "2", java jakarata"" "3", "java jakarta apache" Score : 1 :0.27094576 3 :0.27094576 2 :0.010494952 If we go by query it is giving same score ..It is not working. Thanks Priyanka On Fri, Jan 23, 2015 at 3:19 PM, Ian Lea wrote: > How about "home~10 house~10 flat". See > http://lucene.apache.org/core/4_10_3/queryparser/index.html > > > -- > Ian. > > > On Fri, Jan 23, 2015 at 7:17 AM, Priyanka Tufchi > wrote: > > Hi ALL > > > > I am working on a project which uses lucene for searching . I am > > struggling with boolean based Query : Actual Scenario is > > > > e.g > > In Query, if I give house home flat > > then > > inside It should search house or home or flat but I want to give them > > with weightage like house and home should get high weigh and flat > should > > get less then rest. > > If document contain "Home" .Lucene search should not go for house and > > flat. > > > > I searched on Internet for some good stuff but not able to find any code > > sample or proper syntax for reference . > > > > > > Thanks > > Priyanka > > > > -- > > Launchship Technology respects your privacy. This email is intended only > > for the use of the party to which it is addressed and may contain > > information that is privileged, confidential, or protected by law. If you > > have received this message in error, or do not want to receive any > further > > emails from us, please notify us immediately by replying to the message > and > > deleting it from your computer. > > - > To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org > For additional commands, e-mail: java-user-h...@lucene.apache.org > > -- Launchship Technology respects your privacy. This email is intended only for the use of the party to which it is addressed and may contain information that is privileged, confidential, or protected by law. If you have received this message in error, or do not want to receive any further emails from us, please notify us immediately by replying to the message and deleting it from your computer.
lucene 4.10.3 test comparison benchmarks
Hello Can point me someone lucene test comparison with similar fulltext search solution like : { oracle text query xapian terrier sql serve full text mysql full text } I found some tests comparison but for lucene 3.x instead of 4.x Best Regards,
Re: Boolean Search Query is not workng
Hi Priyanka Construct three different termqueries for house, home and flat. Now for first two termqueries you can set boost on them by setBoost(float b) method of TermQuery class. Now above three termqueries will be clauses of your boolean query, with OCCUR.SHOULD and search in normal way. This may help you. -Nitin On Friday 23 January 2015 03:57 PM, Priyanka Tufchi wrote: Hi Ian I tried with what u sent Query-java~5 jakarta~5 apache tomcat Document : "1", "java jakarta tomcat" "2", java jakarata"" "3", "java jakarta apache" Score : 1 :0.27094576 3 :0.27094576 2 :0.010494952 If we go by query it is giving same score ..It is not working. Thanks Priyanka On Fri, Jan 23, 2015 at 3:19 PM, Ian Lea wrote: How about "home~10 house~10 flat". See http://lucene.apache.org/core/4_10_3/queryparser/index.html -- Ian. On Fri, Jan 23, 2015 at 7:17 AM, Priyanka Tufchi wrote: Hi ALL I am working on a project which uses lucene for searching . I am struggling with boolean based Query : Actual Scenario is e.g In Query, if I give house home flat then inside It should search house or home or flat but I want to give them with weightage like house and home should get high weigh and flat should get less then rest. If document contain "Home" .Lucene search should not go for house and flat. I searched on Internet for some good stuff but not able to find any code sample or proper syntax for reference . Thanks Priyanka -- Launchship Technology respects your privacy. This email is intended only for the use of the party to which it is addressed and may contain information that is privileged, confidential, or protected by law. If you have received this message in error, or do not want to receive any further emails from us, please notify us immediately by replying to the message and deleting it from your computer. - To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org For additional commands, e-mail: java-user-h...@lucene.apache.org - To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org For additional commands, e-mail: java-user-h...@lucene.apache.org
Re: Boolean Search Query is not workng
Use IndexSearcher.explain() to help figure out what matched, why. And watch out for typos: jakarta != jakarata. If you still can't figure it out, post here a very small completely self-contained program or test case, using RAMDirectory, that demonstrates the problem. -- Ian. On Fri, Jan 23, 2015 at 10:27 AM, Priyanka Tufchi wrote: > Hi Ian > > I tried with what u sent > > Query-java~5 jakarta~5 apache tomcat > Document : "1", "java jakarta tomcat" > "2", java jakarata"" > "3", "java jakarta apache" > > Score : 1 :0.27094576 > 3 :0.27094576 > 2 :0.010494952 > > > If we go by query it is giving same score ..It is not working. > > Thanks > Priyanka > > > On Fri, Jan 23, 2015 at 3:19 PM, Ian Lea wrote: > >> How about "home~10 house~10 flat". See >> http://lucene.apache.org/core/4_10_3/queryparser/index.html >> >> >> -- >> Ian. >> >> >> On Fri, Jan 23, 2015 at 7:17 AM, Priyanka Tufchi >> wrote: >> > Hi ALL >> > >> > I am working on a project which uses lucene for searching . I am >> > struggling with boolean based Query : Actual Scenario is >> > >> > e.g >> > In Query, if I give house home flat >> > then >> > inside It should search house or home or flat but I want to give them >> > with weightage like house and home should get high weigh and flat >> should >> > get less then rest. >> > If document contain "Home" .Lucene search should not go for house and >> > flat. >> > >> > I searched on Internet for some good stuff but not able to find any code >> > sample or proper syntax for reference . >> > >> > >> > Thanks >> > Priyanka >> > >> > -- >> > Launchship Technology respects your privacy. This email is intended only >> > for the use of the party to which it is addressed and may contain >> > information that is privileged, confidential, or protected by law. If you >> > have received this message in error, or do not want to receive any >> further >> > emails from us, please notify us immediately by replying to the message >> and >> > deleting it from your computer. >> >> - >> To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org >> For additional commands, e-mail: java-user-h...@lucene.apache.org >> >> > > -- > Launchship Technology respects your privacy. This email is intended only > for the use of the party to which it is addressed and may contain > information that is privileged, confidential, or protected by law. If you > have received this message in error, or do not want to receive any further > emails from us, please notify us immediately by replying to the message and > deleting it from your computer. - To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org For additional commands, e-mail: java-user-h...@lucene.apache.org
Re: Boolean Search Query is not workng
Hello Reply to the mail, sent by Nitin We tried and this is what we got : My query was dotNet^10.0 Resume:jdbc Resume:C# Resume:MVC Documents: .1. java jdbc 2.Java dotNet 3.java jdbc apache 4.java dotNet 5.java 6java jdbc apache dotNet C# MVC 7.jakarta 8",apache 9.java jdbc apache dotNet C# MVC tomcat; 10java jdbc apache dotNet", and result is doc id.1) score :0.031800564 which is unexpected as weightage is given to Dotnet Thanks On Fri, Jan 23, 2015 at 4:34 PM, Ian Lea wrote: > Use IndexSearcher.explain() to help figure out what matched, why. And > watch out for typos: jakarta != jakarata. > > If you still can't figure it out, post here a very small completely > self-contained program or test case, using RAMDirectory, that > demonstrates the problem. > > > -- > Ian. > > > On Fri, Jan 23, 2015 at 10:27 AM, Priyanka Tufchi > wrote: > > Hi Ian > > > > I tried with what u sent > > > > Query-java~5 jakarta~5 apache tomcat > > Document : "1", "java jakarta tomcat" > > "2", java jakarata"" > > "3", "java jakarta apache" > > > > Score : 1 :0.27094576 > > 3 :0.27094576 > > 2 :0.010494952 > > > > > > If we go by query it is giving same score ..It is not working. > > > > Thanks > > Priyanka > > > > > > On Fri, Jan 23, 2015 at 3:19 PM, Ian Lea wrote: > > > >> How about "home~10 house~10 flat". See > >> http://lucene.apache.org/core/4_10_3/queryparser/index.html > >> > >> > >> -- > >> Ian. > >> > >> > >> On Fri, Jan 23, 2015 at 7:17 AM, Priyanka Tufchi > >> wrote: > >> > Hi ALL > >> > > >> > I am working on a project which uses lucene for searching . I am > >> > struggling with boolean based Query : Actual Scenario is > >> > > >> > e.g > >> > In Query, if I give house home flat > >> > then > >> > inside It should search house or home or flat but I want to give > them > >> > with weightage like house and home should get high weigh and flat > >> should > >> > get less then rest. > >> > If document contain "Home" .Lucene search should not go for house > and > >> > flat. > >> > > >> > I searched on Internet for some good stuff but not able to find any > code > >> > sample or proper syntax for reference . > >> > > >> > > >> > Thanks > >> > Priyanka > >> > > >> > -- > >> > Launchship Technology respects your privacy. This email is intended > only > >> > for the use of the party to which it is addressed and may contain > >> > information that is privileged, confidential, or protected by law. If > you > >> > have received this message in error, or do not want to receive any > >> further > >> > emails from us, please notify us immediately by replying to the > message > >> and > >> > deleting it from your computer. > >> > >> - > >> To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org > >> For additional commands, e-mail: java-user-h...@lucene.apache.org > >> > >> > > > > -- > > Launchship Technology respects your privacy. This email is intended only > > for the use of the party to which it is addressed and may contain > > information that is privileged, confidential, or protected by law. If you > > have received this message in error, or do not want to receive any > further > > emails from us, please notify us immediately by replying to the message > and > > deleting it from your computer. > > - > To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org > For additional commands, e-mail: java-user-h...@lucene.apache.org > > -- Launchship Technology respects your privacy. This email is intended only for the use of the party to which it is addressed and may contain information that is privileged, confidential, or protected by law. If you have received this message in error, or do not want to receive any further emails from us, please notify us immediately by replying to the message and deleting it from your computer.
Re: Boolean Search Query is not workng
Hi, While indexing , a norm value is calculated for each field and injected in the index. This norm value is used as field level boosting which is also multiplied with other factors like tf-idf and query level boost which you specify with setBoost. so you see setting boosting is one of the several factors. Moreover, the ranking model used also influences the scoring. Lucene default ranking which is traditional vector space model is known to bias short documents. Experiment with BM 25 also. Additionally, if you are used to using Solr, try using Dismax query parser which is known to address most of the limitations of the default lucene query parser and scoring mechanism. Using Luke.. check the norm for each fields. To prevent norms to be injected during indexing ... index with option No Norms. Thanks, Parnab.. CSE, IIT-KGP BIS, UCC, Ireland On Fri, Jan 23, 2015 at 2:54 PM, Rajendra Rao wrote: > Hello > Reply to the mail, sent by Nitin We tried and this is what we got : > > My query was dotNet^10.0 Resume:jdbc Resume:C# Resume:MVC > > Documents: > .1. java jdbc > 2.Java dotNet > 3.java jdbc apache > 4.java dotNet > 5.java > 6java jdbc apache dotNet C# MVC > 7.jakarta > 8",apache > 9.java jdbc apache dotNet C# MVC tomcat; > 10java jdbc apache dotNet", > > and result is doc id.1) score :0.031800564 which is unexpected as > weightage is given to Dotnet > > Thanks > > > > > On Fri, Jan 23, 2015 at 4:34 PM, Ian Lea wrote: > > > Use IndexSearcher.explain() to help figure out what matched, why. And > > watch out for typos: jakarta != jakarata. > > > > If you still can't figure it out, post here a very small completely > > self-contained program or test case, using RAMDirectory, that > > demonstrates the problem. > > > > > > -- > > Ian. > > > > > > On Fri, Jan 23, 2015 at 10:27 AM, Priyanka Tufchi > > wrote: > > > Hi Ian > > > > > > I tried with what u sent > > > > > > Query-java~5 jakarta~5 apache tomcat > > > Document : "1", "java jakarta tomcat" > > > "2", java jakarata"" > > > "3", "java jakarta apache" > > > > > > Score : 1 :0.27094576 > > > 3 :0.27094576 > > > 2 :0.010494952 > > > > > > > > > If we go by query it is giving same score ..It is not working. > > > > > > Thanks > > > Priyanka > > > > > > > > > On Fri, Jan 23, 2015 at 3:19 PM, Ian Lea wrote: > > > > > >> How about "home~10 house~10 flat". See > > >> http://lucene.apache.org/core/4_10_3/queryparser/index.html > > >> > > >> > > >> -- > > >> Ian. > > >> > > >> > > >> On Fri, Jan 23, 2015 at 7:17 AM, Priyanka Tufchi > > >> wrote: > > >> > Hi ALL > > >> > > > >> > I am working on a project which uses lucene for searching . I am > > >> > struggling with boolean based Query : Actual Scenario is > > >> > > > >> > e.g > > >> > In Query, if I give house home flat > > >> > then > > >> > inside It should search house or home or flat but I want to give > > them > > >> > with weightage like house and home should get high weigh and flat > > >> should > > >> > get less then rest. > > >> > If document contain "Home" .Lucene search should not go for house > > and > > >> > flat. > > >> > > > >> > I searched on Internet for some good stuff but not able to find any > > code > > >> > sample or proper syntax for reference . > > >> > > > >> > > > >> > Thanks > > >> > Priyanka > > >> > > > >> > -- > > >> > Launchship Technology respects your privacy. This email is intended > > only > > >> > for the use of the party to which it is addressed and may contain > > >> > information that is privileged, confidential, or protected by law. > If > > you > > >> > have received this message in error, or do not want to receive any > > >> further > > >> > emails from us, please notify us immediately by replying to the > > message > > >> and > > >> > deleting it from your computer. > > >> > > >> - > > >> To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org > > >> For additional commands, e-mail: java-user-h...@lucene.apache.org > > >> > > >> > > > > > > -- > > > Launchship Technology respects your privacy. This email is intended > only > > > for the use of the party to which it is addressed and may contain > > > information that is privileged, confidential, or protected by law. If > you > > > have received this message in error, or do not want to receive any > > further > > > emails from us, please notify us immediately by replying to the message > > and > > > deleting it from your computer. > > > > - > > To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org > > For additional commands, e-mail: java-user-h...@lucene.apache.org > > > > > > -- > Launchship Technology respects your privacy. This email is intended only > for the use of the party to which it is addressed and may contain > information that is privileged, confidential, or protected by law. If you > have received
Re: ToChildBlockJoinQuery question
Hey Mike, My fault... I wasn't paying attention and thought I was replying to a response from James. No wonder it reminded me of our last conversation. :) -Greg On Thu, Jan 22, 2015 at 10:37 AM, Michael Sokolov < msoko...@safaribooksonline.com> wrote: > Yeah I know -- we've been around this block before. I agree that the > whole block indexing/searching feature is a bit confusing, trappy and > error-prone, and it may be helpful to have those boundary conditions as > signposts, but in my case relaxing the restriction enabled me to execute > the queries I want without having to write a lot of awkward extensions to > my indexing code. That code uses Python's haystack, which is based on > django models, and in order to comply with the parent-not-its-child idea, I > would have had to introduce dummy documents to stand in as the parents, > something that isn't at all natural or straightforward in that > django/haystack view of the world. Maybe the enforcement of that > restriction could be relaxed according to an option in the query > constructor. > > -Mike >
Re: Boolean Search Query is not workng
Hi Pranab/All I totally Agree with you but Atleast it should search for the given query and give the document related to it. I Gave Query : C#,dotnet Documents Taken: 1, jdbc 2 Java dotNet 3 java apache 4 dotNet C# 5 java 6 java apache dotNet C# MVC 7 jakarta 8 apache 9 java apache dotNet C# MVC tomcat 10 java apache dotNet And Output which it gave : No Of hits0 How can it possible as 4 no doc has exact match of query ? If any one has working sample code of boolean Query plz share ... that would be really helpful Thanks On Fri, Jan 23, 2015 at 9:01 PM, parnab kumar wrote: > Hi, > > While indexing , a norm value is calculated for each field and > injected in the index. This norm value is used as field level boosting > which is also multiplied with other factors like tf-idf and query level > boost which you specify with setBoost. so you see setting boosting is one > of the several factors. Moreover, the ranking model used also influences > the scoring. Lucene default ranking which is traditional vector space model > is known to bias short documents. Experiment with BM 25 also. > > Additionally, if you are used to using Solr, try using Dismax query parser > which is known to address most of the limitations of the default lucene > query parser and scoring mechanism. > > > Using Luke.. check the norm for each fields. To prevent norms to be > injected during indexing ... index with option No Norms. > > Thanks, > Parnab.. > CSE, IIT-KGP > BIS, UCC, Ireland > > On Fri, Jan 23, 2015 at 2:54 PM, Rajendra Rao > > wrote: > > > Hello > > Reply to the mail, sent by Nitin We tried and this is what we got : > > > > My query was dotNet^10.0 Resume:jdbc Resume:C# Resume:MVC > > > > Documents: > > .1. java jdbc > > 2.Java dotNet > > 3.java jdbc apache > > 4.java dotNet > > 5.java > > 6java jdbc apache dotNet C# MVC > > 7.jakarta > > 8",apache > > 9.java jdbc apache dotNet C# MVC tomcat; > > 10java jdbc apache dotNet", > > > > and result is doc id.1) score :0.031800564 which is unexpected as > > weightage is given to Dotnet > > > > Thanks > > > > > > > > > > On Fri, Jan 23, 2015 at 4:34 PM, Ian Lea wrote: > > > > > Use IndexSearcher.explain() to help figure out what matched, why. And > > > watch out for typos: jakarta != jakarata. > > > > > > If you still can't figure it out, post here a very small completely > > > self-contained program or test case, using RAMDirectory, that > > > demonstrates the problem. > > > > > > > > > -- > > > Ian. > > > > > > > > > On Fri, Jan 23, 2015 at 10:27 AM, Priyanka Tufchi > > > wrote: > > > > Hi Ian > > > > > > > > I tried with what u sent > > > > > > > > Query-java~5 jakarta~5 apache tomcat > > > > Document : "1", "java jakarta tomcat" > > > > "2", java jakarata"" > > > > "3", "java jakarta apache" > > > > > > > > Score : 1 :0.27094576 > > > > 3 :0.27094576 > > > > 2 :0.010494952 > > > > > > > > > > > > If we go by query it is giving same score ..It is not working. > > > > > > > > Thanks > > > > Priyanka > > > > > > > > > > > > On Fri, Jan 23, 2015 at 3:19 PM, Ian Lea wrote: > > > > > > > >> How about "home~10 house~10 flat". See > > > >> http://lucene.apache.org/core/4_10_3/queryparser/index.html > > > >> > > > >> > > > >> -- > > > >> Ian. > > > >> > > > >> > > > >> On Fri, Jan 23, 2015 at 7:17 AM, Priyanka Tufchi > > > >> wrote: > > > >> > Hi ALL > > > >> > > > > >> > I am working on a project which uses lucene for searching . I am > > > >> > struggling with boolean based Query : Actual Scenario is > > > >> > > > > >> > e.g > > > >> > In Query, if I give house home flat > > > >> > then > > > >> > inside It should search house or home or flat but I want to give > > > them > > > >> > with weightage like house and home should get high weigh and > flat > > > >> should > > > >> > get less then rest. > > > >> > If document contain "Home" .Lucene search should not go for house > > > and > > > >> > flat. > > > >> > > > > >> > I searched on Internet for some good stuff but not able to find > any > > > code > > > >> > sample or proper syntax for reference . > > > >> > > > > >> > > > > >> > Thanks > > > >> > Priyanka > > > >> > > > > >> > -- > > > >> > Launchship Technology respects your privacy. This email is > intended > > > only > > > >> > for the use of the party to which it is addressed and may contain > > > >> > information that is privileged, confidential, or protected by law. > > If > > > you > > > >> > have received this message in error, or do not want to receive any > > > >> further > > > >> > emails from us, please notify us immediately by replying to the > > > message > > > >> and > > > >> > deleting it from your computer. > > > >> > > > >> > - > > > >> To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org > > > >> For additional commands, e-mail: java-user-h...@lucene.apache.org > > > >> > > >