Re: Classic QueryParser, StandardQueryParser, Quotes

2019-10-10 Thread baris . kazar
c... >> As key I have a StringField, keys can contain space(s), e. g. "a b". I >> know I should use TermQuery. >> >> But I've been playing with classic QueryParser, which does not match the >> indexed keys, >> >> not with »a backslash space b« >

Re: Classic QueryParser, StandardQueryParser, Quotes

2019-10-10 Thread Ameer Albahem
ying to test lucene 8.2.0 as key-value store; > I know that there are specialized ones like lmdb etc... > As key I have a StringField, keys can contain space(s), e. g. "a b". I > know I should use TermQuery. > > But I've been playing with classic QueryParser, which does

Re: Classic QueryParser, StandardQueryParser, Quotes

2019-10-10 Thread Erick Erickson
uot;. I know I > should use TermQuery. > > But I've been playing with classic QueryParser, which does not match the > indexed keys, > > not with »a backslash space b« > > nor with »quote a space b quote«. > > Now the funny part: The StandardQueryParser does wor

Classic QueryParser, StandardQueryParser, Quotes

2019-10-10 Thread Jochen Barth
Dear reader, I'm trying to test lucene 8.2.0 as key-value store; I know that there are specialized ones like lmdb etc... As key I have a StringField, keys can contain space(s), e. g. "a b". I know I should use TermQuery. But I've been playing with classic QueryParser,

QueryParser

2017-02-16 Thread Corbin, J.D.
I am using org.apache.lucene.queryparser.classic.QueryParser to generate my queries in Lucene 6.4.1 and the class level docs indicate there is a "new" QueryParser in contrib. I am wondering if the documentation in the class is accurate and if so, where is this "new" QueryP

Re: LongField when searched using classic QueryParser doesnot yield results

2017-01-11 Thread Amrit Sarkar
Hi Jaspreet, Not sure whether this helps to answer your question as I didn't try to run the code: >From official guide: > Within Lucene, each numeric value is indexed as a *trie* structure, where > each term is logically assigned to larger and larger pre-defined brackets > (which are simply lowe

RE: LongField when searched using classic QueryParser doesnot yield results

2017-01-11 Thread Uwe Schindler
nal Message- > From: Amrit Sarkar [mailto:sarkaramr...@gmail.com] > Sent: Wednesday, January 11, 2017 9:52 AM > To: gene...@lucene.apache.org > Cc: java-user@lucene.apache.org > Subject: Re: LongField when searched using classic QueryParser doesnot yield > results > > Hi Jaspr

LongField when searched using classic QueryParser doesnot yield results

2017-01-10 Thread
Query to find a lucene document based on AssetId field */ QueryParser assetIdQueryparser = new QueryParser("AssetId", standardAnalyzer); Query query = assetIdQueryparser.parse("" + assetId); query(query,Integer.MAX_VALUE, new TextQueryResultCollector

RE: QueryParser with CustomAnalyzer wrongly uses PatternReplaceCharFilter

2016-04-28 Thread Uwe Schindler
Hi, this is a general problem of using Analyzers in combination with QueryParser. Query Parsing is done *before* the terms are tokenized: QueryParser uses a JavaCC grammar to parse the query. This involves some query-parsing specific tokenization. Once the query parser has analyzed the syntax

Re: QueryParser with CustomAnalyzer wrongly uses PatternReplaceCharFilter

2016-04-28 Thread Steve Rowe
Classic QueryParser splits on whitespace and then sends the chunks to the analyzer one at a time. See <https://issues.apache.org/jira/browse/LUCENE-2605>. -- Steve www.lucidworks.com > On Apr 28, 2016, at 5:54 AM, Bahaa Eldesouky wrote: >

QueryParser with CustomAnalyzer wrongly uses PatternReplaceCharFilter

2016-04-28 Thread Bahaa Eldesouky
("patternreplace", "pattern", "(movie|film|picture).*", "replacement", "") .withTokenizer("standard") .build(); QueryParser qp = new QueryParser("name", nameAnal

Migrating custom queryparser plugin (4.3) to SolCloud ( 5.0)

2015-03-26 Thread Chetan Vora
Hi We're looking to migrate some custome Lucene queryparser plugins and custom request handlers that we wrote with Solr 4.3 to the latest version of Solr. While we're at it, we would also like to move to Solr Cloud. Should we expect these plugins/request handlers to be compatible wit

Re: Lucene QueryParser/Analyzer inconsistency

2014-06-19 Thread Luis Pureza
er(version, mappingFilter); return new TokenStreamComponents(tokenizer); } When I try this: QueryParser parser = new QueryParser(Version.LUCENE_48, "f", new MyAnalyzer(Version.LUCENE_48)); System.err.println(parser.parse(QueryParser.escape("one/two"))); I get

Re: Lucene QueryParser/Analyzer inconsistency

2014-06-18 Thread Luis Pureza
, just try a simple, unescaped slash in your char mapping table. > > -- Jack Krupansky > > -Original Message- From: Luis Pureza > Sent: Tuesday, June 17, 2014 1:43 PM > To: java-user@lucene.apache.org > Subject: Lucene QueryParser/Analyzer inconsistency > > > Hi,

Re: Lucene QueryParser/Analyzer inconsistency

2014-06-17 Thread Jack Krupansky
e 17, 2014 1:43 PM To: java-user@lucene.apache.org Subject: Lucene QueryParser/Analyzer inconsistency Hi, I'm experience a puzzling behaviour with the QueryParser and was hoping someone around here can help me. I have a very simple Analyzer that tries to replace forward slashes (/) by spaces.

Lucene QueryParser/Analyzer inconsistency

2014-06-17 Thread Luis Pureza
Hi, I'm experience a puzzling behaviour with the QueryParser and was hoping someone around here can help me. I have a very simple Analyzer that tries to replace forward slashes (/) by spaces. Because QueryParser forces me to escape strings with slashes before parsing, I added a MappingCharF

Re: QueryParser

2014-03-26 Thread Liu Bo
ndardAnalyzer will break > CJK into characters: > > 1 : 轻 > 2 : 歌 > 3 : 曼 > 4 : 舞 > 5 : 庆 > 6 : 元 > 7 : 旦 > > If you initialize the classic QueryParser with StandardAnalyzer, the > parser will use that Analyzer to break this string into individual > charact

RE: QueryParser

2014-03-24 Thread Allison, Timothy B.
To expand on Herb's comment, in Lucene, the StandardAnalyzer will break CJK into characters: 1 : 轻 2 : 歌 3 : 曼 4 : 舞 5 : 庆 6 : 元 7 : 旦 If you initialize the classic QueryParser with StandardAnalyzer, the parser will use that Analyzer to break this string into individual characters as

Re: QueryParser

2014-03-24 Thread Herb Roitblat
-- Dear Team, we are using lucene in our product , it well searching for high speed and performance but Japaneese, chinese and korean language not searching properly we had use QueryParser QueryParser is splitted into word like "轻歌曼舞庆元旦"

Re: QueryParser

2014-03-24 Thread Michael McCandless
igh speed and performance but > > > Japaneese, chinese and korean language not searching properly > we had use QueryParser > > > QueryParser is splitted into word like "轻歌曼舞庆元旦" > > > Example > >

Re: QueryParser

2014-03-23 Thread kalaik
hinese and korean language not searching properly we had use QueryParser QueryParser is splitted into word like "轻歌曼舞庆元旦" Example This word "轻歌曼舞庆元旦" split

RE: QueryParser

2014-03-21 Thread Allison, Timothy B.
What analyzer are you using? smartcn? From: kalaik [kalaiselva...@zohocorp.com] Sent: Friday, March 21, 2014 5:10 AM To: java-user@lucene.apache.org Subject: QueryParser Dear Team, we are using lucene in our product , it well searching

QueryParser

2014-03-21 Thread kalaik
Dear Team, we are using lucene in our product , it well searching for high speed and performance but Japaneese, chinese and korean language not searching properly we had use QueryParser QueryParser is splitted into word like "轻歌

Re: Reusability of QueryParser

2014-01-06 Thread Mindaugas Žakšauskas
default it uses GLOBAL_REUSE_STRATEGY (the no-arg constructor does this). So > create the Analyzer with PER_FIELD_REUSE_STRATEGY explicitely passed to > super's ctor. > > With separate instances of Analyzer and QueryParser, it will not reuse (as a > new instance is created each time).

RE: Reusability of QueryParser

2014-01-06 Thread Uwe Schindler
to super's ctor. With separate instances of Analyzer and QueryParser, it will not reuse (as a new instance is created each time). This also affects the indexer. Once you index more than one document, the same will happen (it will reuse the components for the first field name encountered).

Reusability of QueryParser

2014-01-06 Thread Mindaugas Žakšauskas
Hi, I was wondering if a QueryParser can be reused (Lucene ver: 4.6.0)? >From my experiment it looks like it retains some state from the previous query. Isolated example: public class Test { public static void main(String[] args) throws ParseException, IOException { MyAnaly

RE: QueryParser stripping off Hyphen from query

2013-10-17 Thread raghavendra.k.rao
Ian - Thank you for your inputs. Regards, Raghu -Original Message- From: Ian Lea [mailto:ian@gmail.com] Sent: Tuesday, October 15, 2013 11:43 AM To: java-user@lucene.apache.org Subject: Re: QueryParser stripping off Hyphen from query If you want to keep hyphens you could try

Re: QueryParser stripping off Hyphen from query

2013-10-15 Thread Ian Lea
rdAnalyzer. > > Regards, > Raghu > > > -Original Message- > From: Uwe Schindler [mailto:u...@thetaphi.de] > Sent: Monday, October 14, 2013 6:38 PM > To: java-user@lucene.apache.org > Subject: RE: QueryParser stripping off Hyphen from query > > The problem is not

RE: QueryParser stripping off Hyphen from query

2013-10-14 Thread raghavendra.k.rao
-user@lucene.apache.org Subject: RE: QueryParser stripping off Hyphen from query The problem is not query parser, it is your analyzer. - Uwe Schindler H.-H.-Meier-Allee 63, D-28213 Bremen http://www.thetaphi.de eMail: u...@thetaphi.de > -Original Message- > From: raghavendra.k@b

RE: QueryParser stripping off Hyphen from query

2013-10-14 Thread Uwe Schindler
, October 15, 2013 12:15 AM > To: java-user@lucene.apache.org > Subject: QueryParser stripping off Hyphen from query > > Hi, > > I am using the regular QueryParser to form a PhraseQuery. It works fine, but > when it consists of a hyphen, it gets removed, hence resulting in unex

QueryParser stripping off Hyphen from query

2013-10-14 Thread raghavendra.k.rao
Hi, I am using the regular QueryParser to form a PhraseQuery. It works fine, but when it consists of a hyphen, it gets removed, hence resulting in unexpected results. Note: I am NOT using the QueryParser.escape() method before parse() method as it results in a BooleanQuery, while I want a

Re: Providing special characters in input when using QueryParser.

2013-09-10 Thread Ankit Murarka
Ok..The problem seems to be solved.. Using the escape method of QueryParser, I am able to parse the given input with special characters also. But if this leads to another pitfall someone may please guide.. On 9/10/2013 12:19 PM, Ankit Murarka wrote: Hello, I am using StandardAnalyzer

Providing special characters in input when using QueryParser.

2013-09-09 Thread Ankit Murarka
Hello, I am using StandardAnalyzer for indexing all the documents. While Searching say for Boolean/Wildcard/Prefix query, I am using *QueryParser* for the user supplied input. But when I supply / as an input along with some characters like: \ I get a lexcial error due to presence of

Re: Boosting potential phrases when using QueryParser

2013-08-27 Thread Ian Lea
I don't think there's a standard solution. Using PhraseQuery as you suggest should work - you could also look at the setSlop(s) method of PhraseQuery. SpanQuery and its friends such as SpanNearQuery are more flexible but not generated by default by QueryParser, although if you are g

Boosting potential phrases when using QueryParser

2013-08-26 Thread Leonid Bolshinsky
ments that contain all the 3 terms, but rank higher documents that contain some of the terms next to each other like: "*professional development*" or "*development leader*" or "*professional development leader*". We want to keep using QueryParser and avoid dealing

Boosting potential phrases when using QueryParser

2013-08-26 Thread Leonid Bolshinsky
ments that contain all the 3 terms, but rank higher documents that contain some of the terms next to each other like: "*professional development*" or "*development leader*" or "*professional development leader*". We want to keep using QueryParser and avoid dealing

Re: how to by pass analyzer one some fields in QueryParser ?

2013-07-28 Thread Jack Krupansky
--Original Message- From: Wenbo Zhao Sent: Sunday, July 28, 2013 10:41 AM To: lucene-user-mail-list Subject: Re: how to by pass analyzer one some fields in QueryParser ? sorry guys I think I made a mistake the parse string I use was "date:\"2013/07/2*\" text:..." the quote

Re: how to by pass analyzer one some fields in QueryParser ?

2013-07-28 Thread Wenbo Zhao
sorry guys I think I made a mistake the parse string I use was "date:\"2013/07/2*\" text:..." the quoted "" makes queryparser ignored trailing '*' and analyze the string. I changed to "date:2013\/07\/2* text:...", it works fine. sorry for the dis

how to by pass analyzer one some fields in QueryParser ?

2013-07-28 Thread Wenbo Zhao
Hi, all I'm stuck in one simple question, as title says, I think it should have a simple solution. Say I use StandardAnalyzer and have two fields in all documents, StringField("date"...) is not tokenized, format is 2013/07/28 TextField("text" ...) is tokenized.

RE: QueryParser for DisjunctionMaxQuery, et al.

2013-07-23 Thread Beale, Jim (US-KOP)
: QueryParser for DisjunctionMaxQuery, et al. : Subject: QueryParser for DisjunctionMaxQuery, et al. : References: <1374578398714-4079673.p...@n3.nabble.com> : In-Reply-To: <1374578398714-4079673.p...@n3.nabble.com> https://people.apache.org/~hossman/#threadhijack Thread Hijacking on M

RE: QueryParser for DisjunctionMaxQuery, et al.

2013-07-23 Thread Beale, Jim (US-KOP)
a custom SearchHandler in Solr which would parse it and process it. This may not be the best way to go but it seems feasible. An additional benefit of having a full-blown Lucene QueryParser is that we would be able to use Luke for quickly examining the Lucene results for queries taken from

Re: QueryParser for DisjunctionMaxQuery, et al.

2013-07-23 Thread Chris Hostetter
: Subject: QueryParser for DisjunctionMaxQuery, et al. : References: <1374578398714-4079673.p...@n3.nabble.com> : In-Reply-To: <1374578398714-4079673.p...@n3.nabble.com> https://people.apache.org/~hossman/#threadhijack Thread Hijacking on Mailing Lists When starting a new dis

Re: QueryParser for DisjunctionMaxQuery, et al.

2013-07-23 Thread Jack Krupansky
P) Sent: Tuesday, July 23, 2013 10:07 AM To: java-user@lucene.apache.org Subject: QueryParser for DisjunctionMaxQuery, et al. Hello all, It seems somewhat odd to me that the Query classes generate strings that the QueryParser won't parse. Does anyone have a QueryParser that will parse the

QueryParser for DisjunctionMaxQuery, et al.

2013-07-23 Thread Beale, Jim (US-KOP)
Hello all, It seems somewhat odd to me that the Query classes generate strings that the QueryParser won't parse. Does anyone have a QueryParser that will parse the full range of Lucene query strings? Failing that, has the BNF been written down somewhere? I can't seem to find it fo

Re: Upgrading Lucene 2.0.0 TermQuery to 4.2 QueryParser

2013-04-03 Thread Lewis John Mcgibbney
ooleanQuery in Lucene 4.x in exactly the same way like in 2.0. No need to use QueryParser (and it's not a good idea to use QP for non-analyzed fields like product IDs). TermQuery is the way to go. > > - > Uwe Schindler > H.-H.-Meier-Allee 63, D-28213 Bremen > http://www.the

RE: Upgrading Lucene 2.0.0 TermQuery to 4.2 QueryParser

2013-04-03 Thread Uwe Schindler
Hi, You can use TermQuery and BooleanQuery in Lucene 4.x in exactly the same way like in 2.0. No need to use QueryParser (and it's not a good idea to use QP for non-analyzed fields like product IDs). TermQuery is the way to go. - Uwe Schindler H.-H.-Meier-Allee 63, D-28213 Bremen

Upgrading Lucene 2.0.0 TermQuery to 4.2 QueryParser

2013-04-03 Thread Lewis John Mcgibbney
7;ve got here try { DirectoryReader reader = DirectoryReader.open(indexFilePath); IndexSearcher searcher = new IndexSearcher(reader); org.apache.lucene.search.Query query = new QueryParser (Version.LUCENE_42, productId, new StandardAnalyzer(Version.LUCENE

Re: Do you still have to override QueryParser to allow numeric range searches in Lucene 4.1

2013-02-25 Thread Michael McCandless
ld.getName(), value, ft)); > } > > whihc seems neater > > In 3.6 I also add to override queryparser to make it work for numeric range > searches, do I still have to do this and if so how do I modify it to work > for > IntField. > > package o

Do you still have to override QueryParser to allow numeric range searches in Lucene 4.1

2013-02-25 Thread Paul Taylor
teger value) { FieldType ft = new FieldType(); ft.setStored(true); ft.setIndexed(true); ft.setNumericType(FieldType.NumericType.INT); doc.add(new IntField(field.getName(), value, ft)); } whihc seems neater In 3.6 I also add to override queryparser to ma

Re: Analyzer in QueryParser behaves differently from IndexWriter

2013-01-13 Thread Igal @ getRailo.org
thanks Erik. I tried putting the query in "double quotes" and it made some difference but still not exactly what I'm looking for. so what's my best solution? to avoid using the QueryParser and instead "parse" the query myself? is there a different (better) qu

Re: Analyzer in QueryParser behaves differently from IndexWriter

2013-01-13 Thread Erik Hatcher
The analyzer through QueryParser is invoked for each "clause" and thus in your example it's invoked 4 times and thus each invocation only sees one word/term. Erik On Jan 13, 2013, at 2:13, "Igal @ getRailo.org" wrote: > hi, > > I've created an

Analyzer in QueryParser behaves differently from IndexWriter

2013-01-12 Thread Igal @ getRailo.org
hi, I've created an Analyzer that performs a few filtering tasks, including creating Shingles and term Replacements among other things. I use that Analyzer with IndexWriter and it works as expected. but when I use that same Analyzer with QueryP

Re: Why QueryParser isn't in API?

2012-11-12 Thread Chris Male
All the QueryParsers were consolidated into their own module in Lucene 4.0. http://lucene.apache.org/core/4_0_0/queryparser/index.html On Mon, Nov 12, 2012 at 6:16 PM, 余靖毅 <502437...@qq.com> wrote: > I'm a new Lucene programmer. I want to know why the class of QueryParser >

Why QueryParser isn't in API?

2012-11-12 Thread ??????
I'm a new Lucene programmer. I want to know why the class of QueryParser didn't find in api. And a simple example in docs still used the class. And are there anthor methods to replace it. Thx! Harry Yu

Re: Searching for a search string containing a literal slash doesn't work with QueryParser

2012-10-01 Thread Jochen Hebbrecht
t: Monday, October 01, 2012 10:44 AM > > To: java-user@lucene.apache.org > Subject: Re: Searching for a search string containing a literal slash > doesn't work with QueryParser > > You can apply the lower case filter to the whitespace or other analyzer and > use that as the an

Re: Searching for a search string containing a literal slash doesn't work with QueryParser

2012-10-01 Thread Jack Krupansky
x27;t work with QueryParser You can apply the lower case filter to the whitespace or other analyzer and use that as the analyzer. -- Jack Krupansky -Original Message- From: Jochen Hebbrecht Sent: Monday, October 01, 2012 10:34 AM To: java-user@lucene.apache.org Subject: Re: Searching

Re: Searching for a search string containing a literal slash doesn't work with QueryParser

2012-10-01 Thread Jack Krupansky
containing a literal slash doesn't work with QueryParser Hi Jack, I tried analyzing through WhitespaceAnalyzer. Now I can search on my query string AND I can find my document! Great! But all my searches are now case sensitive. So when I index a field as "JavaOne", I also have to enter in

Re: Searching for a search string containing a literal slash doesn't work with QueryParser

2012-10-01 Thread Jochen Hebbrecht
ack Krupansky > Sent: Monday, October 01, 2012 9:58 AM > To: java-user@lucene.apache.org > Subject: Re: Searching for a search string containing a literal slash > doesn't work with QueryParser > > > The scape merely assures that the slash will not be parsed as query syntax > and

Re: Searching for a search string containing a literal slash doesn't work with QueryParser

2012-10-01 Thread Jack Krupansky
That's "The escape merely..." -- Jack Krupansky -Original Message- From: Jack Krupansky Sent: Monday, October 01, 2012 9:58 AM To: java-user@lucene.apache.org Subject: Re: Searching for a search string containing a literal slash doesn't work with QueryParse

Re: Searching for a search string containing a literal slash doesn't work with QueryParser

2012-10-01 Thread Jack Krupansky
-Original Message- From: Jochen Hebbrecht Sent: Monday, October 01, 2012 8:59 AM To: java-user@lucene.apache.org Subject: Searching for a search string containing a literal slash doesn't work with QueryParser Hi, I'm currently trying to search on the following search string in my Lu

Re: QueryParser and BooleanQuery

2012-07-26 Thread Deepak Shakya
ont see any parse() method for StandardAnalyzer. > > In your case, presumably at indexing time you should be using a > PerFieldAnalyzerWrapper with cs-uri getting a KeywordAnalyser. > > If you pass that analyser in when you construct the QueryParser, it > won't remove the slas

Re: QueryParser and BooleanQuery

2012-07-23 Thread Trejkaz
lyzerWrapper with cs-uri getting a KeywordAnalyser. If you pass that analyser in when you construct the QueryParser, it won't remove the slash. The main thing is that you should use the same analyser for indexing and searching. TX ---

Re: QueryParser and BooleanQuery

2012-07-23 Thread Ian Lea
QueryParser returns a query. Just add that to the BooleanQuery. QueryParser qp = ...; BooleanQuery bq = new BooleanQuery(); Query parsedq = qp.parse("...); bq.add(parsedq, ...); -- Ian. On Mon, Jul 23, 2012 at 1:16 PM, Deepak Shakya wrote: > Hey Jack, > > Can you let me kno

Re: QueryParser and BooleanQuery

2012-07-23 Thread Deepak Shakya
Sunday, July 22, 2012 9:35 PM > To: java-user@lucene.apache.org > Subject: Re: QueryParser and BooleanQuery > > > I tried changing the case to lower case, but still the BooleanQuery doesn't > return any documents. > > I see that the text "/blank" is converte

Re: QueryParser and BooleanQuery

2012-07-22 Thread Jack Krupansky
-Original Message- From: Deepak Shakya Sent: Sunday, July 22, 2012 9:35 PM To: java-user@lucene.apache.org Subject: Re: QueryParser and BooleanQuery I tried changing the case to lower case, but still the BooleanQuery doesn't return any documents. I see that the text "

Re: QueryParser and BooleanQuery

2012-07-22 Thread Deepak Shakya
I tried changing the case to lower case, but still the BooleanQuery doesn't return any documents. I see that the text "/blank" is converted to "blank" in the QueryParser. But in BooleanQuery it remains the same. When I remove the forward slash sign from the input

Re: QueryParser and BooleanQuery

2012-07-22 Thread Jack Krupansky
- Jack Krupansky -Original Message- From: Deepak Shakya Sent: Sunday, July 22, 2012 10:17 AM To: java-user@lucene.apache.org Subject: QueryParser and BooleanQuery Hi, I have following dataset indexed in Lucene. 2010-04-21 02:24:01 GET /blank 200 120 2010-04-21 02:24:01 GET /US/registra

QueryParser and BooleanQuery

2012-07-22 Thread Deepak Shakya
500 567 2010-04-21 02:24:04 GET /blank 200 897 2010-04-21 02:24:04 POST /blank 200 567 2010-04-21 02:24:05 GET /US/search 200 658 2010-04-21 02:24:05 POST /US/shop 200 768 2010-04-21 02:24:05 GET /blank 200 347 I am querying it in two ways, first with QueryParser and other with BooleanQuery

Re: QueryParser, double quotes and wilcard inside the double quotes

2012-07-05 Thread Israel Tsadok
), it will match docs 1 and 2. > > On Jul 4, 2012 10:13 AM, "Jochen Hebbrecht" > wrote: > > > > Thanks Ian, I'll give it a try! > > > > 2012/7/3 Ian Lea > > > > > You can use the QueryParser proximity feature e.g. "foo test"~n

Re: QueryParser, double quotes and wilcard inside the double quotes

2012-07-05 Thread Israel Tsadok
ks Ian, I'll give it a try! > > 2012/7/3 Ian Lea > > > You can use the QueryParser proximity feature e.g. "foo test"~n where > > n is the max distance you want them to be apart. Or look at the > > SpanQuery stuff e.g. SpanNearQuery. > > > > > &g

Re: QueryParser, double quotes and wilcard inside the double quotes

2012-07-04 Thread Jochen Hebbrecht
Thanks Ian, I'll give it a try! 2012/7/3 Ian Lea > You can use the QueryParser proximity feature e.g. "foo test"~n where > n is the max distance you want them to be apart. Or look at the > SpanQuery stuff e.g. SpanNearQuery. > > > -- > Ian. > >

Re: QueryParser, double quotes and wilcard inside the double quotes

2012-07-03 Thread Ian Lea
You can use the QueryParser proximity feature e.g. "foo test"~n where n is the max distance you want them to be apart. Or look at the SpanQuery stuff e.g. SpanNearQuery. -- Ian. On Tue, Jul 3, 2012 at 4:59 PM, Jochen Hebbrecht wrote: > Hi all, > > Imagine you have the fo

Re: Support for NumericRangeQuery in QueryParser

2012-06-12 Thread Jochen Hebbrecht
xible query parser in contrib allows for numeric fields (you need to > configure it to "know" the types of fields, e.g. which fields are long > float,...). Alternatively use the code from my "Java Magazin" article a few > years ago and customize core's QueryParser b

RE: Support for NumericRangeQuery in QueryParser

2012-06-12 Thread Uwe Schindler
Hi Jochen, the flexible query parser in contrib allows for numeric fields (you need to configure it to "know" the types of fields, e.g. which fields are long float,...). Alternatively use the code from my "Java Magazin" article a few years ago and customize core's Quer

PrecedenceQueryParser vs. QueryParser discrepancy

2012-03-04 Thread wburzyns
Hi devs, There is a discrepancy in parsing behavior between PrecedenceQueryParser and QueryParser if the query is both single term and negative-only, e.g. "-exchange:nasdaq". In this case with QueryParser the returned Query object is instanceof BooleanQuery wh

Re: Performance of MultiFieldQueryParser versus QueryParser

2012-03-02 Thread Ian Lea
Highly unlikely unless your subclass was slow for some reason. -- Ian. On Fri, Mar 2, 2012 at 7:31 AM, Paul Taylor wrote: > If I happen to subclass MultiFieldQueryParser unneccessarily (thought need > more than one default search but don't after all) would it  have any impact > on performance

Performance of MultiFieldQueryParser versus QueryParser

2012-03-01 Thread Paul Taylor
If I happen to subclass MultiFieldQueryParser unneccessarily (thought need more than one default search but don't after all) would it have any impact on performance ? thanks Paul - To unsubscribe, e-mail: java-user-unsubscr

Re: QueryParser strange behavior

2012-03-01 Thread Ganesh
It is fixed now. I need to enable qp.setAutoGeneratePhraseQueries(true); Regards Ganesh - Original Message - From: "Ganesh" To: Sent: Friday, March 02, 2012 10:46 AM Subject: Re: QueryParser strange behavior Hello Damerian, Please let me know, How you fixed the pro

Re: QueryParser strange behavior

2012-03-01 Thread Ganesh
her of the token matches, it returns the results. Regards Ganesh - Original Message - From: "Damerian" To: Sent: Thursday, March 01, 2012 7:57 PM Subject: Re: QueryParser strange behavior > Στις 1/3/2012 3:08 μμ, ο/η Ian Lea έγραψε: >> Not a clue. I suggest you po

Re: QueryParser strange behavior

2012-03-01 Thread Damerian
quot;) say? -- Ian. On Mon, Feb 27, 2012 at 7:42 PM, Damerianwrote: Στις 27/2/2012 11:45 πμ, ο/η Ian Lea έγραψε: Does your analyzer look for a field called content, not contents? -- Ian. On Sat, Feb 25, 2012 at 6:37 AM, Damerian wrote: Hello! I have a small issue with the QueryPars

Re: QueryParser strange behavior

2012-03-01 Thread Ian Lea
γραψε: >>>> >>>> Does your analyzer look for a field called content, not contents? >>>> >>>> >>>> -- >>>> Ian. >>>> >>>> >>>> On Sat, Feb 25, 2012 at 6:37 AM, Damerian >>>>  wrote:

Re: QueryParser strange behavior

2012-03-01 Thread Damerian
amerianwrote: Hello! I have a small issue with the QueryParser in my program. It uses my custom filter to Parse its queries, but i get unexpexted results from when i am having an input from the keyboard To illustrate the code : Analyzer myAnalyzer = new ProperNameAnalyzer(); Query query = new

Re: QueryParser strange behavior

2012-02-28 Thread Ian Lea
d called content, not contents? >> >> >> -- >> Ian. >> >> >> On Sat, Feb 25, 2012 at 6:37 AM, Damerian  wrote: >>> >>> Hello! >>> >>> I have a small issue with the QueryParser in my program. >>> It uses my custom filter to Parse

Re: QueryParser strange behavior

2012-02-27 Thread Damerian
Στις 27/2/2012 11:45 πμ, ο/η Ian Lea έγραψε: Does your analyzer look for a field called content, not contents? -- Ian. On Sat, Feb 25, 2012 at 6:37 AM, Damerian wrote: Hello! I have a small issue with the QueryParser in my program. It uses my custom filter to Parse its queries, but i get

Re: QueryParser strange behavior

2012-02-27 Thread Ian Lea
Does your analyzer look for a field called content, not contents? -- Ian. On Sat, Feb 25, 2012 at 6:37 AM, Damerian wrote: > Hello! > > I have a small issue with the QueryParser in my program. > It uses my custom filter to Parse its queries, but i get unexpexted results >

QueryParser strange behavior

2012-02-24 Thread Damerian
Hello! I have a small issue with the QueryParser in my program. It uses my custom filter to Parse its queries, but i get unexpexted results from when i am having an input from the keyboard To illustrate the code : Analyzer myAnalyzer = new ProperNameAnalyzer(); Query query = new

Re: Differences between BooleanQuery and QueryParser

2012-01-30 Thread Erick Erickson
erence... Do what's easiest, *then* optimize if necessary... Best Erick On Mon, Jan 30, 2012 at 5:38 PM, Felipe Carvalho wrote: > Has anyone ever measured the difference? Could it make a 10%+ difference on > a search involving around 5 terms? > > On Mon, Jan 30, 2012 at 8:05 PM, Bran

Re: Differences between BooleanQuery and QueryParser

2012-01-30 Thread Felipe Carvalho
Has anyone ever measured the difference? Could it make a 10%+ difference on a search involving around 5 terms? On Mon, Jan 30, 2012 at 8:05 PM, Brandon Mintern wrote: > A QueryParser has to actually parse your text and build up the > BooleanQuery exactly as you do in your second example.

Re: Differences between BooleanQuery and QueryParser

2012-01-30 Thread Brandon Mintern
A QueryParser has to actually parse your text and build up the BooleanQuery exactly as you do in your second example. Since the QueryParser is doing extra work that you don't have to do considering that you already know everything about the query, your second example is faster. On Mon, J

Inheritance heirarchy in the contrib-queryparser package

2012-01-04 Thread 1983-01-06
Hi folks, I was recommended to use PrecedenceQueryParser if I want boolean precedence in my queries. While examining this class, I have noticed that it and its super class do not extend the QueryParser but have a separate implementation/hierarchy. All other parsers in that package do extend

Re: Is it possible to combine Wildcard and Phrasequery for the Queryparser

2011-10-13 Thread Dmitry Savenko
Hello! Here is a solution I come up with. Heavy code, has limitations, but works for my case. // parsing query QueryParser parser = new QueryParser(LUCENE_VERSION, CONTENTS_FIELD, analyzer); Query q = parser.parse("\"" + QueryParser.escape(phraseText) + "

Is it possible to combine Wildcard and Phrasequery for the Queryparser

2011-10-13 Thread Ralf Heyde
t;The Right Way*" . title:"The Right Way"* But these approaches don't work using the QueryParser - a ParseException is thrown. Does anybody have an idea how to face this problem? Is there a general (another) solution for that problem? Regards Ralf

Use of enablePositionIncrements in StopFilter and QueryParser

2011-09-08 Thread James Faulkner
QueryParser#setEnablePositionIncrements} if you use QueryParser to create queries. I am indeed using QueryParser to create queries. Will it cause any conflicts if the value of enablePositionIncrements in Stopfilter is false while the value of enablePositionIncrements in QueryParser is true? From my

ignore boolean clauses QueryParser

2011-07-20 Thread Raffaele Branda
Dear Lucene developers, is there a way to let the QueryParser ignore the boolean operators? I need to send as query the source code of a class but obviously when in the string given as input to the QueryParser there is a "and" or "or" or "not" it sees them like the

Re: Telling query-time QueryParser how to work by a TokenFilter

2011-06-09 Thread Em
Hi list, if one read line 470 and the following (getFieldQuery) of the queryParser class, one can see, how some attributes are already used to parse the query-string correctly. At the moment, I see almost no chance to implement the wanted behaviour without doing copy & paste on the code fo

Telling query-time QueryParser how to work by a TokenFilter

2011-06-08 Thread Em
It is no option to increase minimumMatch of the boolean query at this point! What I want is to tell the queryParser in some way, i.e. by an Attribute, that it should create a boolean query like this "i AND pad" OR "pad" without giving "pad" a boost for its two occurences

Re: QueryParser/StopAnalyzer question

2011-05-28 Thread Erick Erickson
Sorry, I was at Lucene Revolution, and out of circulation for a while. I agree with your point that "it depends" (what correct behavior is). Seems like a lot of Solr/Lucene has that answer... But as to stop words, the trend lately is to NOT remove them anyway. The whole stop word issue comes from

Re: QueryParser/StopAnalyzer question

2011-05-23 Thread Mindaugas Žakšauskas
Hi Erick, I think answer to this question depends which hat you put on. If you put search engine hat (or do similar things in, i.e. Google), the results will be the same as what Lucene does at the moment. And that's fair enough - getting more results in search engine world is almost always better

Re: QueryParser/StopAnalyzer question

2011-05-23 Thread Erick Erickson
Hmmm, somehow I missed this days ago Anyway, the Lucene query parsing process isn't quite Boolean logic. I encourage you to think in terms of "required", "optional", and "prohibited". Both queries are equivalent, to see this try attaching &debugQuery=on to your URL and look at the "parsed que

Re: QueryParser/StopAnalyzer question

2011-05-23 Thread Mindaugas Žakšauskas
Not much luck so far :( Just in case if anyone wants to earn some virtual dosh, I have added some 50 bonus points to this question on StackOverflow: http://stackoverflow.com/questions/6044061/lucene-query-parsing-behaviour-joining-query-parts-with-and I also promise to post a solution here if an

  1   2   3   4   5   6   >