Re: Lucene Query Metrics

2024-12-04 Thread Mikhail Khludnev
Hello, There's nothing like that. On top of my head is a profile collector in Elasticsearch. On Wed, Dec 4, 2024 at 11:46 PM ashwini singh wrote: > Does lucene provide extensions (utilities)to extract metrics from Lucene > during the request execution? Or applications can only track execution >

Re: Lucene Query Metrics

2024-12-04 Thread ashwini singh
Does lucene provide extensions (utilities)to extract metrics from Lucene during the request execution? Or applications can only track execution stats on top of Lucene. On Tue, 3 Dec 2024 at 23:20, Adrien Grand wrote: > Lucene doesn't expose query metrics, it's up to the application that > integr

Re: Lucene Query Metrics

2024-12-03 Thread Adrien Grand
Lucene doesn't expose query metrics, it's up to the application that integrates Lucene to compute and expose metrics that are relevant to them. Le mer. 4 déc. 2024, 00:31, ashwini singh a écrit : > Hey everyone, > > Does lucene provide any query metrics (perf) ? I am looking for something > very

Lucene Query Metrics

2024-12-03 Thread ashwini singh
Hey everyone, Does lucene provide any query metrics (perf) ? I am looking for something very similar to MongoSB explain() output or Execution metrics for Cosmos DB? *Thanks and Regards,* *Ashwini Singh*

Re: Difference between '-' and 'NOT' in Lucene Query.

2024-05-06 Thread Mikhail Khludnev
gt; > > '-' and 'NOT' in query string stands for same reason theoretically. > > > > > > But, in practical, is there any difference? > > > > Why I am asking the question. In our product, we have got an incident > related to different resul

Re: Difference between '-' and 'NOT' in Lucene Query.

2024-05-06 Thread Paul Libbrecht
or below two queries. 1. Lucene Query String : report -kind:"AAD.AnalysisApplication_Bookmark" -kind:BIWidgets -kind:Discussions -kind:"DSL.MetaDataFile" -kind:"DSL.Universe" -kind:Event -kind:LCMJob -kind:ObjectPackage -kind:Profile -kind:Program -kind:Publica

Re: Difference between '-' and 'NOT' in Lucene Query.

2024-05-06 Thread Paul Libbrecht
[cid:image001.png@01DA9FCF.A22DAD00] [cid:image002.png@01DA9FD0.1DB4C0D0] But, in practical, is there any difference? Why I am asking the question. In our product, we have got an incident related to different result set for below two queries. 1. Lucene Query String : report -kind:"AAD.Ana

Difference between '-' and 'NOT' in Lucene Query.

2024-05-06 Thread Saha, Rajib
ifference? Why I am asking the question. In our product, we have got an incident related to different result set for below two queries. 1. Lucene Query String : report -kind:"AAD.AnalysisApplication_Bookmark" -kind:BIWidgets -kind:Discussions -kind:"DSL.MetaDataFile

回复:Lucene Query parser term Length

2020-01-20 Thread 陈志祥
e the contents of this communication to others. -- 发件人:Akanksha 日 期:2020年01月20日 20:55:23 收件人: 主 题:Lucene Query parser term Length Hello Everyone I am working with Lucene 4.7.1 When parsing query using Lucene query parser. If query l

Lucene Query parser term Length

2020-01-20 Thread Akanksha
Hello Everyone I am working with Lucene 4.7.1 When parsing query using Lucene query parser. If query length is greater than 255 bytes, it returns query with space appended after every 255 bytes. Which is causing further issues in my project. Can you please let me know why the term (parsed query

Re: Apply Lucene Query on Bits

2016-12-06 Thread Hendrik Dev
: Adrien Grand [mailto:jpou...@gmail.com] >> Sent: Monday, December 5, 2016 3:35 PM >> To: java-user@lucene.apache.org >> Subject: Re: Apply Lucene Query on Bits >> >> Do I get it right that you have a query that defines a set of visible >> documents, and you want t

RE: Apply Lucene Query on Bits

2016-12-05 Thread Uwe Schindler
ject: Re: Apply Lucene Query on Bits > > Do I get it right that you have a query that defines a set of visible > documents, and you want to make sure that your FilterReader only sees > those > documents? > > If this is the case, then you could use FixedBitSet.or to load the &g

Re: Apply Lucene Query on Bits

2016-12-05 Thread Adrien Grand
Do I get it right that you have a query that defines a set of visible documents, and you want to make sure that your FilterReader only sees those documents? If this is the case, then you could use FixedBitSet.or to load the Scorer.iterator() into a FixedBitSet, and then maintain two caches: - one

Re: Apply Lucene Query on Bits

2016-12-05 Thread Mikhail Khludnev
Hello Hendrik, I lurked sources and find nothing better than copy a few pieces from org.apache.lucene.search.MultiTermQueryConstantScoreWrapper and especially org.apache.lucene.search.MultiTermQueryConstantScoreWrapper.createWeight(...).new ConstantScoreWeight() {...}.scorer(DocIdSet). On Sun, De

Apply Lucene Query on Bits

2016-12-04 Thread Hendrik Dev
Hi, how to apply a org.apache.lucene.search.Query on a given org.apache.lucene.util.Bits object? Background: I have a subclass of org.apache.lucene.index.FilterLeafReader where i want to filter the livedocs by applying a query on the "Bits". According to javadoc i need also to override numDocs()

Re: Lucene Query Parser Special Characters

2016-10-14 Thread Ashley Ryan
The documentation I'm referencing is here: https://lucene.apache.org/core/4_5_1/queryparser/org/apache/lucene/queryparser/classic/package-summary.html#package_description, with a note: org.apache.lucene.queryparser.flexible.standard

Re: Lucene Query Parser Special Characters

2016-10-13 Thread Trejkaz
On Fri, Oct 14, 2016 at 2:47 AM, Ashley Ryan wrote: > Obviously, our work around of escaping the angle brackets works as we need > it to, but it seems to me that your documentation is incorrect. Am I > misunderstanding the documentation or conflating the issue I'm seeing with > the topic of specia

Lucene Query Parser Special Characters

2016-10-13 Thread Ashley Ryan
Hi, I'm working on a project that uses the org.apache.lucene.queryparser.flexible.standard.parser.StandardSyntaxParser. I found in the documentation online that the list of special characters is as follows: + - && || ! ( ) { } [ ] ^ " ~ * ? : \ This list does not include angle brackets (< >) but

Lucene Query Time JOIN - sort by parent

2016-04-22 Thread Diamantino Campos
Hi, I've been trying to use the JoinUtil.createJoinQuery method in order to get results. I've Parent-> Childs relation and I want to return childs result to users. Query joinQuery = JoinUtil.createJoinQuery(idField, toField , parentQuery, searcher); TopDocs result = searcher.search(joinQu

Re: Any lucene query sorts docs by Hamming distance?

2015-12-24 Thread Jack Krupansky
Not currently. In fact, FuzzyQuery only supports edit distances up to 2 in order to guarantee great performance: https://lucene.apache.org/core/5_4_0/core/org/apache/lucene/search/FuzzyQuery.html?is-external=true The old, unlimited edit distance version is still semi-supported as SlowFuzzyQuery, b

Re: Any lucene query sorts docs by Hamming distance?

2015-12-24 Thread will martin
here’s a thought from the algorithm world: hamming is the upper bound on levenshtein. does that help you? -w > On Dec 24, 2015, at 4:10 AM, Yonghui Zhao wrote: > > I mean sort and filter. I want to filter all documents within some > hamming distances say 3, and sort them from distance 0 to

Re: Any lucene query sorts docs by Hamming distance?

2015-12-24 Thread Yonghui Zhao
I mean sort and filter. I want to filter all documents within some hamming distances say 3, and sort them from distance 0 to 3. 2015-12-22 21:42 GMT+08:00 will martin : > Yonghui: > > Do you mean sort, rank or score? > > Thanks, > Will > > > > > On Dec 22, 2015, at 4:02 AM, Yonghui Zhao wrote

Re: Any lucene query sorts docs by Hamming distance?

2015-12-22 Thread will martin
Yonghui: Do you mean sort, rank or score? Thanks, Will > On Dec 22, 2015, at 4:02 AM, Yonghui Zhao wrote: > > Hi, > > Is there any query can sort docs by hamming distance if field values are > same length, > > Seems fuzzy query only works on edit distance. ---

Any lucene query sorts docs by Hamming distance?

2015-12-22 Thread Yonghui Zhao
Hi, Is there any query can sort docs by hamming distance if field values are same length, Seems fuzzy query only works on edit distance.

Re: lucene query complexity

2015-11-20 Thread Jack Krupansky
Sigh. Yeah, I agree that a simple big-O won't work for Lucene. But nonetheless, we really should have some sort of performance characterization. When people ask me about how to characterize Lucene/Solr performance I always tell them that it is highly non-linear, with lots of optimizations and optio

Re: lucene query complexity

2015-11-20 Thread search engine
What if we have some assumptions. For example, we assume that we have only one segment and the entire segment is in memory ? thanks, Zong On Fri, Nov 20, 2015 at 4:38 AM, Adrien Grand wrote: > I don't think the big-O notation is appropriate to measure the cost of > Lucene queries. > > Le mer. 1

Re: lucene query complexity

2015-11-20 Thread Adrien Grand
I don't think the big-O notation is appropriate to measure the cost of Lucene queries. Le mer. 11 nov. 2015 à 20:31, search engine a écrit : > Hi, > > I've been thinking how to use big O annotation to show complexity for > different types of queries, like term query, prefix query, phrase query,

lucene query complexity

2015-11-11 Thread search engine
Hi, I've been thinking how to use big O annotation to show complexity for different types of queries, like term query, prefix query, phrase query, wild card and fuzzy query. Any ideas? thanks, Zong

Re: Lucene Query to String

2015-11-10 Thread Markus Boese
Hey Alessandro, thanks for your reply. A few minutes ago I found an issue in my code and now everything is working as expected. Sorry, for wasting for time :/ 2015-11-10 16:25 GMT+01:00 Alessandro Benedetti <[abenede...@apache.org](mailto:abenede...@apache.org)>: \-- Mit fr

Re: Lucene Query to String

2015-11-10 Thread Alessandro Benedetti
Hi Markus, what is the logic behind your query parser? How the query is expected to be rewritten ? I've never seen that kind of rewritten query, but if you tell us what you are expecting to rewrite, maybe would be easier to help! Cheers On 10 November 2015 at 14:31, Markus Boese wrote: > Hi, >

Lucene Query to String

2015-11-10 Thread Markus Boese
Hi, I've written my own QueryParser and now i've a strange issue. I'm parsing the following string : 'abcd 1' Then this tokens are created: 'abcd' '1' This is my query.toString() output : '+f:abcd f:abcd$ f:^abcd^4.0 +f:abcd[ , 1] f:^abcd[ , 1] +f:1' Could anyone explain what lucene w

Re: Lucene query behavior using NOT

2015-02-08 Thread Trejkaz
On Sun, Feb 8, 2015 at 9:04 PM, Uwe Schindler wrote: > Hi, > > Lucene does not use algebraic / boolean logic! Maybe review this blog > post: https://lucidworks.com/blog/why-not-and-or-and-not/ This article is an old classic. The "plus, minus, nothing" operators aren't without their issues either

RE: Lucene query behavior using NOT

2015-02-08 Thread Uwe Schindler
lliker [mailto:ikoelli...@axsone.com] > Sent: Friday, February 06, 2015 10:47 PM > To: java-user@lucene.apache.org > Subject: Lucene query behavior using NOT > > Hello, > I am trying to understand whether I am using the NOT operator correctly. I > have the following scenario: >

Lucene query behavior using NOT

2015-02-08 Thread Ian Koelliker
Hello, I am trying to understand whether I am using the NOT operator correctly. I have the following scenario: Query 1 = body:(a OR NOT b) This is parsed as: (body:a) -(body:b) and finds 96,620 hits Query 2 = body:(a OR (*:* AND NOT b)) This is parsed as: (body:a) (+*:* -(body:b)) and finds 1

RE: lucene query with additional clause field not null

2014-12-01 Thread Uwe Schindler
.-H.-Meier-Allee 63, D-28213 Bremen http://www.thetaphi.de eMail: u...@thetaphi.de > -Original Message- > From: Sascha Janz [mailto:sascha.j...@gmx.net] > Sent: Monday, December 01, 2014 8:44 PM > To: java-user@lucene.apache.org > Subject: lucene query with additional clause

Re: lucene query with additional clause field not null

2014-12-01 Thread Ahmet Arslan
Hi Sascha, Generally RangeQuery is used for that, e.g. fieldName:[* TO *] Ahmet On Monday, December 1, 2014 9:44 PM, Sascha Janz wrote: Hi, is there a chance to add a additional clause to a query for a field that should not be null ? greetings sascha -

lucene query with additional clause field not null

2014-12-01 Thread Sascha Janz
Hi, is there a chance to add a additional clause to a query for a field that should not be null ? greetings sascha

Re: Questions about the Lucene query language

2014-10-28 Thread Prad Nelluru
Thanks, Jack! From: Jack Krupansky Sent: Monday, October 27, 2014 8:41 PM To: java-user@lucene.apache.org Subject: Re: Questions about the Lucene query language Pure negative queries are not supported, but all you need to do is include *:*, which

Re: Questions about the Lucene query language

2014-10-27 Thread Jack Krupansky
:57 PM To: java-user@lucene.apache.org Subject: Questions about the Lucene query language Hi everyone, I'm trying to understand how to use the Lucene query language. 1. Does Lucene support negative phrase queries like -"hello dolly" ? Or do I need to subtract from some other

Questions about the Lucene query language

2014-10-27 Thread Prad Nelluru
Hi everyone, I'm trying to understand how to use the Lucene query language. 1. Does Lucene support negative phrase queries like -"hello dolly" ? Or do I need to subtract from some other term like: joy -"hello dolly" ? My intention is to find all documents t

Re: Lucene Query

2014-08-19 Thread Jin Guang Zheng
Thanks so much, that works. Jin On Tue, Aug 19, 2014 at 4:13 PM, Uwe Schindler wrote: > Hi, > Look at his docs. He has only 2 docs, the second one 3 keywords. > > I would use a simple phrase query with a slop value < Analyzers > positionIncrementGap. This is the gap between fields with same na

Re: Lucene Query

2014-08-19 Thread Tri Cao
Oh sorry guys, ignore what I said. I am going to get myself a coffee. Uwe is absolutely correct here. On Aug 19, 2014, at 01:13 PM, Uwe Schindler wrote: Hi, Look at his docs. He has only 2 docs, the second one 3 keywords. I would use a simple phrase query with a slop value < Analyzers positi

Re: Lucene Query

2014-08-19 Thread Uwe Schindler
Hi, Look at his docs. He has only 2 docs, the second one 3 keywords. I would use a simple phrase query with a slop value < Analyzers positionIncrementGap. This is the gap between fields with same name. Span or phrase cannot cross the gap, if slop if small enough, but large enough to find the te

Re: Lucene Query

2014-08-19 Thread Tri Cao
Whoops, the constraint should be MUST to force all terms present: http://lucene.apache.org/core/4_6_0/core/org/apache/lucene/search/BooleanClause.Occur.html#MUST On Aug 19, 2014, at 01:05 PM, "Tri Cao" wrote: OR operator does that, AND only returns docs with ALL terms present. Note that you h

Re: Lucene Query

2014-08-19 Thread Tri Cao
OR operator does that, AND only returns docs with ALL terms present. Note that you have two options here 1. Create a BooleanQuery object (see the Java doc I linked below) and programatically add the term queries with the following constraint: http://lucene.apache.org/core/4_6_0/core/org/apache/l

Re: Lucene Query

2014-08-19 Thread Jin Guang Zheng
Thanks for reply, but won't BooleanQuery return both doc1 and doc2 with query: label:States AND label:America AND label:United Best, Jin On Tue, Aug 19, 2014 at 2:07 PM, Tri Cao wrote: > given that example, the easy way is a boolean AND query of all the terms: > > > http://lucene.apache.org/c

Re: Lucene Query

2014-08-19 Thread Tri Cao
given that example, the easy way is a boolean AND query of all the terms: http://lucene.apache.org/core/4_6_0/core/org/apache/lucene/search/BooleanQuery.html However, if your corpus is more sophisticated you'll find that relevance ranking is not always that trivial :) On Aug 19, 2014, at 11:00

Lucene Query

2014-08-19 Thread Jin Guang Zheng
Hi, I am wondering if someone can help me on this: I have index: doc 1 -- label: United States of America doc 2 -- label: United doc 2 -- label: America doc 2 -- label: States I am wondering how to generate a query with terms: states united america so only doc 1 returns. I was thinking Spa

Re: Lucene Query Wrong Result for phrase.

2014-07-18 Thread Jack Krupansky
, 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 b

Re: Lucene Query Wrong Result for phrase.

2014-07-18 Thread itisismail
sing 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.

2014-07-18 Thread Ian Lea
le 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. --

Lucene Query Wrong Result for phrase.

2014-07-17 Thread itisismail
sh(-) 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.

Lucene Query Tool (lqt)

2013-10-03 Thread Joel Barry
Hi folks, Here's a small tool that I'm releasing as open source. I hope some of you might find it useful: https://github.com/joelb-git/lqt Lucene Query Tool (lqt) is a small utility for executing and formatting Lucene queries from the command line (rather from inside a graphical tool

Re: Lucene Query Syntax with analyzed and unanalyzed text

2013-09-16 Thread Ian Lea
org.apache.lucene.analysis.miscellaneous.PerFieldAnalyzerWrapper in analyzers-common is what you need. There's an example in the javadocs. Build and use the wrapper instance in place of StandardAnalyzer or whatever you are using now. -- Ian. On Mon, Sep 16, 2013 at 5:36 PM, Scott Smith wrote

Lucene Query Syntax with analyzed and unanalyzed text

2013-09-16 Thread Scott Smith
I want to be sure I understand this correctly. Suppose I have a search that I'm going to run through the query parser that looks like: body:"some phrase" AND keyword:"my-keyword" clearly "body" and "keyword" are field names. However, the additional information is that the "body" field is anal

Re: Lucene Query About Sorting

2012-06-28 Thread Karthik Muthuswami
On Jun 26, 2012, at 5:32 AM, Apostolis Xekoukoulotakis wrote: > I am just new here. > > When you make a query, you create an ordering of the documents based on > this query. > If you have a second ordering, you have to decide what to do with those 2 > orderings. You have to decide how to join th

Re: Lucene Query About Sorting

2012-06-27 Thread Apostolis Xekoukoulotakis
Cant he synchronously iterate over both fields postingLists and use one priorityQueue that picks the docs that contain the query and have the best order according to the second field. It requires more work but this should be feasible. 2012/6/27 Ian Lea > I think he wants 1, sort all matched doc

Re: Lucene Query About Sorting

2012-06-27 Thread Ian Lea
I think he wants 1, sort all matched docs by field A. If lucene sorting doesn't work for you you can always sort the hits yourself using whatever technique you want. Sorting large numbers of docs is always going to be expensive. -- Ian. On Wed, Jun 27, 2012 at 8:54 AM, Li Li wrote: > what do

Re: Lucene Query About Sorting

2012-06-27 Thread Li Li
what do you want to do? 1. sort all matched docs by field A. 2. sort all matched docs by relevant score, selecting top 100 docs and then sort by field A On Wed, Jun 27, 2012 at 1:44 PM, Yogesh patel wrote: > Thanks for reply Ian , > > But i just gave suppose document number..i have 2-3 GB index

Re: Lucene Query About Sorting

2012-06-26 Thread Yogesh patel
Thanks for reply Ian , But i just gave suppose document number..i have 2-3 GB index and every day , it goes higher. so i cant use searcher.maxdoc(). So i need this solution. Can you please help me out? On Tue, Jun 26, 2012 at 10:42 PM, Ian Lea wrote: > Do you mean you want all hits that match

Re: Lucene Query About Sorting

2012-06-26 Thread Ian Lea
Do you mean you want all hits that match B:abc, sorted by field A? As opposed to the top 100 hits sorted by field A? Just pass a higher value in the search(query, ... 100, ...) call. It will be slower and potentially use more memory but with only 10K docs you probably won't notice. -- Ian.

Re: Lucene Query About Sorting

2012-06-26 Thread Apostolis Xekoukoulotakis
I am just new here. When you make a query, you create an ordering of the documents based on this query. If you have a second ordering, you have to decide what to do with those 2 orderings. You have to decide how to join those two. The default search orders your results by the query and picks the

Re: Need help About Lucene Query

2012-04-15 Thread Adriano Crestani
plemented in our project.But I > need help about my lucene question. > > I have one Index which has two fields. A and B > Some values are like below > A B > ___ > > AC 10 > AC 20 > ACC 30 > ACC40 > ACP70 > > I need l

Re: Lucene Query Parser

2011-11-28 Thread Ian Lea
Just use one of the search() methods that does sorting and specify an array of sort fields with SortField.SCORE first, then your name fields. But be aware that complex real world textual queries and docs rarely produce identical scores. You could post-process the results and group them into "good

Lucene Query Parser

2011-11-28 Thread Romiko Derbynew
Hi Guys, I am using Lucene with Neo4j. Currently I have queries working well with a combination of Exact and Fuzzy matches in one query. However, we desire a report that first takes the ranking and boosting as the highest priority, but then we want to sort my first name and last name, and alwa

Re: Regarding Lucene Query

2011-09-25 Thread Erick Erickson
11:51 PM, Yogesh patel wrote: > Respected, > > Hello, I am using lucene  with my java application. I am having one > confusion. I want to paginate my search and want 20-30 results and total > results are 10. So When i query in application, it gives me heap space > error. So can

Regarding Lucene Query

2011-09-25 Thread Yogesh patel
Respected, Hello, I am using lucene with my java application. I am having one confusion. I want to paginate my search and want 20-30 results and total results are 10. So When i query in application, it gives me heap space error. So can we fire lucene query so we can only get 20-30 results

Lucene query processing

2011-04-26 Thread Alex vB
a value contains tf if I set setOmitTermFreqAndPositions(true)? Allways 1? 4) How are term freqs, payloads read from disk? In bulk for all remaining docs at once or every time a document gets scored? Regards Alex -- View this message in context: http://lucene.472066.n3.nabble.com/Lucene-query

Re: lucene query type

2010-11-16 Thread Ian Lea
Lucene will generally do the right thing without much help - docs with more matches will score better and thus be presented first. But you can give it a helping hand, perhaps with some query boosting: build a boolean query and add an AND query with a positive boost, then an OR query with smaller o

lucene query type

2010-11-16 Thread maven apache
Hi: There are types of TermQuery,TermRangeQuery,and the BooleanQuery and etc built in lucene,and they can be combined to make a powerful search. However I wonder if this is useful for a user in the client side? For example,I build a web user interface with a search textfield(like the google) for

Re: Is the new Lucene Query parser framework compatibility with older lucene versions ?

2010-04-28 Thread kannan chandrasekaran
Hi Adriano, Ahhh !!! Good point...Thanks a ton for the quick response. Kannan From: Adriano Crestani To: java-user@lucene.apache.org Sent: Wed, April 28, 2010 7:31:20 PM Subject: Re: Is the new Lucene Query parser framework compatibility with older lucene

Re: Is the new Lucene Query parser framework compatibility with older lucene versions ?

2010-04-28 Thread Adriano Crestani
Hi Kannan, contrib-queryparser code is not compatible with 2.4 release because it uses the Attribute API, which was only introduced in 2.9. Regards, Adriano Crestani On Wed, Apr 28, 2010 at 8:44 PM, kannan chandrasekaran wrote: > Hi All, > > I have a question regarding the new Luc

Is the new Lucene Query parser framework compatibility with older lucene versions ?

2010-04-28 Thread kannan chandrasekaran
Hi All, I have a question regarding the new Lucene query parser framework in the contribs project. My company's project is running on top of 2.4.0 release of Lucene. I am trying to evaluate the new query parser framework that was added to the contribs project in the Lucene 2.9.0 re

Re: Lucene query with long strings

2010-03-24 Thread Grant Ingersoll
On Mar 24, 2010, at 9:20 AM, Shashi Kant wrote: > Add the common terms such as "University", "School", "Medicine", > "Institute" etc. to stopwords list, so you are left with Stanford, > "Palo Alto" etc. I don't know if I would remove them, but you might consider using the CommonGram or n-gram a

Re: Lucene query with long strings

2010-03-24 Thread Shashi Kant
Add the common terms such as "University", "School", "Medicine", "Institute" etc. to stopwords list, so you are left with Stanford, "Palo Alto" etc. Then use Ahmet's suggestion of using a booleanquery .setMinimumNumberShouldMatch() to (say) 75% of the query string length. Finally, if you wish to

RE: Lucene query with long strings

2010-03-23 Thread Steven A Rowe
Hi Aaron, Your "false positives" comments point to a mismatch between what you're currently asking Lucene for (any document matching any one of the terms in the query) and what you want (only fully "correct" matches). You need to identify the terms of the query that MUST match and tell Lucene

Re: Lucene query with long strings

2010-03-23 Thread Ahmet Arslan
> hi all, I have been playing > with Lucene for a while now, but stuck on a perplexing > issue. > > I have an index, with a field "Affiliation", some example > values are: > > - "Stanford University School of Medicine, Palo Alto, CA > USA", > - "Institute of Neurobiology, School of Medicine, Sta

Lucene query with long strings

2010-03-23 Thread Aaron Schon
hi all, I have been playing with Lucene for a while now, but stuck on a perplexing issue. I have an index, with a field "Affiliation", some example values are: - "Stanford University School of Medicine, Palo Alto, CA USA", - "Institute of Neurobiology, School of Medicine, Stanford University, P

Re: Problem in lucene query

2009-09-10 Thread Erick Erickson
cing a problem while performing searches. I am > using lucene 2.2.0. > > My application indexes documents on "keyword" field which contains integer > values. If the value is negative the query does not return correct results. > > > > Following is my lucene query: > >

Re: Problem in lucene query

2009-09-10 Thread Anshum
quot;keyword" field which contains integer > values. If the value is negative the query does not return correct results. > > > > Following is my lucene query: > > > > (keyword: \-1) > > > > I also tried: > > (keyword: "-1") > > > >

Re: Problem in lucene query

2009-09-10 Thread AHMET ARSLAN
> I am new to Lucene and facing a problem while performing > searches. I am using lucene 2.2.0. > > My application indexes documents on "keyword" field which > contains integer values. Which analyzer/tokenizer are you using on that field? I am assuming it is a tokenized field. >If the value is

Problem in lucene query

2009-09-10 Thread vibhuti
Hello I am new to Lucene and facing a problem while performing searches. I am using lucene 2.2.0. My application indexes documents on "keyword" field which contains integer values. If the value is negative the query does not return correct results. Following is my lu

Re: Lucene query syntax using grouping, MUST, MUST_NOT and SHOULD

2009-08-25 Thread AHMET ARSLAN
--- On Tue, 8/25/09, Henric Müller wrote: > From: Henric Müller > Subject: Lucene query syntax using grouping, MUST, MUST_NOT and SHOULD > To: java-user@lucene.apache.org > Date: Tuesday, August 25, 2009, 12:20 PM > Hi, > > I have experience some strange things when

Lucene query syntax using grouping, MUST, MUST_NOT and SHOULD

2009-08-25 Thread Henric Müller
Hi, I have experience some strange things when dealing with Lucene queries. I've read some threads on this list and realize that Lucene shouldn't be seen as a complete boolean query language. However I try to understand the Lucene-way and have one example that I wonder if someone can help me

Re: Possible to invoke same Lucene query on a String?

2009-08-20 Thread ohaya
plicated document way I mentioned above. > > Cheers, > > Paul Paul, Oh boy, you've given me a LOT to chew on :)!! At first read, I like your #1 approach, maybe because it's easiest for me to understand. I have to think about it, but my first thought is that we might n

Re: Possible to invoke same Lucene query on a String?

2009-08-20 Thread Paul Cowan
oh...@cox.net wrote: - I'd have to create a (very small) index, for each sub-document, where I do the Document.add() with just the (for example) two terms, then - Run a query against the 1-entry index, which - Would either give me a "yes" or "no" (for that sub-document) As I said, I'm concerned

Re: Possible to invoke same Lucene query on a String?

2009-08-20 Thread ohaya
Paul Cowan wrote: > oh...@cox.net wrote: > > Document1 subdoc1 term1 term2 > > subdoc2 term1a term2a > > subdoc3 term1b term2b > > > > However, I've now been asked to implement the ability to query t

Re: Possible to invoke same Lucene query on a String?

2009-08-20 Thread Paul Cowan
oh...@cox.net wrote: Document1 subdoc1 term1 term2 subdoc2 term1a term2a subdoc3 term1b term2b However, I've now been asked to implement the ability to query the sub-documents. In other words, rather t

Re: Possible to invoke same Lucene query on a String?

2009-08-20 Thread ohaya
Hi, I guess, that, in short, what I'm really trying to find out is: If I construct a Lucene query, can I (somehow) use that to query a String object that I have, rather than querying against a Lucene index? Thanks, Jim oh...@cox.net wrote: > Hi, > > This question is

Possible to invoke same Lucene query on a String?

2009-08-20 Thread ohaya
need to query the 3 sub-strings from the 'summary', i.e., run the "term1a AND term2a" query against the following strings: subdoc1 term1 term2 subdoc2 term1a term2a subdoc3 term1b term2b I guess that I can write a method to do that, but I want to make sure that the sub-document/

Lucene Query Field Info

2009-06-09 Thread Shayak Sen
I construct a boolean query to search a term in each of the field of the index. Once I retrieve the hits, is it possible to retrieve which field matched to the particular term. For example: I have fields A B C with data a b c. A B C a b a Then I search for A:a B:a C:a and get a hit. Can I tell wh

Re: Question on Proximity Search in Lucene Query

2009-03-02 Thread Erick Erickson
*** > > > Hi, > > I have a question on the proximity query usage in Lucene Query Syntax. > > The documentation says "W1 W2"~5 means W1 and W2 can occur within 5 words. > Here W1 & W2 represents Words. > >

Question on Proximity Search in Lucene Query

2009-03-02 Thread Vasudevan Comandur
. Regards Vasu ** Hi, I have a question on the proximity query usage in Lucene Query Syntax. The documentation says "W1 W2"~5 means W1 and W2 can occur within 5 words. Here W1 & W2 represents Words. What happens when

Question on Proximity Search in Lucene Query

2009-02-22 Thread Vasudevan Comandur
Hi, I have a question on the proximity query usage in Lucene Query Syntax. The documentation says "W1 W2"~5 means W1 and W2 can occur within 5 words. Here W1 & W2 represents Words. What happens when I give "W1 W2 W3 W4"~25 as proximity query? Does it treat

How can i analyse a Lucene Query ?

2009-02-21 Thread Kanterwoopy
I have to know the words which were important that a post was found by the searcher. What classes can i use for this ? What does QueryScorer do ? Can somebody give me a short overview over my possibilities ? -- View this message in context: http://www.nabble.com/How-can-i-analyse-a-Lucene

Re: Lucene Query returns always the first ID

2008-10-28 Thread Hadi Forghani
your problem is about new one Document for all sourcefiles i think you have 2 solution 1.new document in first step of loop(like below code) [code] for (int i = 0; i < sourcefiles.size(); i++) { for (int j = 0; j < sourcefiles.elementAt(i).getNumberOfRevisions(

Lucene Query returns always the first ID

2008-10-28 Thread Sebastian Müller
hi folks, i have great trouble while using lucene to implement search functionality to my application: this way i index: [code] public void indexData() throws CorruptIndexException, LockObtainFailedException, IOException { Analyzer analyzer = new StandardAnalyzer();

Re: About The Lucene Query Syntax

2008-09-15 Thread M. Fatih Soydan
We are using Abbyy (FineReader) Index&Search Libraries and Morpology SDK since 1999. Our SearchString are likes these : ** *borusan* | Soruşan* | bbrusan* | "borusan istanbul filarmo*" | "gürer aykal*" | "borusan oda orkestras*" | "borusan sanat gale*" | "zehra * *nurhan kocabıyık ilköretim*"* **

Re: About The Lucene Query Syntax

2008-09-15 Thread Erick Erickson
The unsatisfactory answer is "because that's the way it works". I suspect that the underlying issue is what happens when you try to expand phrase searches via wildcards. Wildcard searches are already plagued by "TooManyClauses" exceptions, which would only get worse with phrases In fact, downright

Re: About The Lucene Query Syntax

2008-09-15 Thread M. Fatih Soydan
I read. But i didn't understand why not ? 15 Eylül 2008 Pazartesi 16:56 tarihinde Erick Erickson <[EMAIL PROTECTED]> yazdı: > wildcards are NOT supported within double quotes, so if > you are submitting your query > "Technology Gunlugu*" > WITH the double quotes, you are searching for > that liter

  1   2   >