Re: Automatic prefix search in query parser

2021-09-03 Thread Gauthier Roebroeck
ave to type the `*` after each term. > > > > An example query could be: `author:(murphy OR remender) AND batman AND > > release_date:1999`, which should be transformed to `author:(murphy* OR > > remender*) AND batman* AND release_date:1999*`. > > > > Is there an

Re: Automatic prefix search in query parser

2021-09-03 Thread Erik Hatcher
he Lucene query parsers ? I checked the > classic and standard query parser, but couldn't find any option to do so. > > If there was a way to decide which fields could automatically be prefixed, > that would be even better. > > Thanks a lot ---

Automatic prefix search in query parser

2021-09-03 Thread Gauthier Roebroeck
:1999*`. Is there any way to do this with the Lucene query parsers ? I checked the classic and standard query parser, but couldn't find any option to do so. If there was a way to decide which fields could automatically be prefixed, that would be even better. Thanks a lot

Query parser automatic prefix

2021-08-24 Thread Gauthier Roebroeck
:1999*`. Is there any way to do this with the Lucene query parsers ? I checked the classic and standard query parser, but couldn't find any option to do so. If there was a way to decide which fields could automatically be prefixed, that would be even better. Thanks a lot

回复: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: Practical usages of arbitrary Shingles when using a query parser?

2018-07-31 Thread Chris Hostetter
: The query parser is confused by these overlapping positions indeed, which : it interprets as synonyms. I was going to write that you should set the Sure -- i'm not blaming the QueryParser, what it does with the Shingles output makes sense (and actual works! .. just not as efficientl

Re: Practical usages of arbitrary Shingles when using a query parser?

2018-07-31 Thread Adrien Grand
Hi Hoss, The query parser is confused by these overlapping positions indeed, which it interprets as synonyms. I was going to write that you should set the same min and max shingle sizes at query time, but while writing that I realized that you probably wanted to keep outputing shorter shingles so

Practical usages of arbitrary Shingles when using a query parser?

2018-07-30 Thread Chris Hostetter
Although I've been aware of Shings and some of the useful applications for a long time, today is the first tiem i really sat down and tried to do something non-trivial with them myself. My objective seems realatively straight forard: given a corpus of text and some analyzer (for sake of dis

Fwd: Wildcard query parser of MultiFieldQueryParser should support boosts

2017-08-17 Thread Yegor Dovganich
Hello, can someone review my patch? https://issues.apache.org/jira/browse/LUCENE-7917 -- Regards, Yegor Dovganich - To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org For additional commands, e-mail: java-user-h..

QueryNode / query parser performance

2017-04-12 Thread Trejkaz
So... I know none of this work is possible to contribute back to Lucene because the API I've ended up with is too different, but I thought I would share anyway. For a query with 10,000 terms: Before any changes: ~7s Change 1: Change QueryNodeImpl to hold an immutable list of children and only c

RE: query parser of SpanNearQuery

2016-12-05 Thread Allison, Timothy B.
Subject: query parser of SpanNearQuery It seems lucene query parser doesn't support SpanNearQuery. Is there any query parser supports SpanNearQuery?

Re: query parser of SpanNearQuery

2016-12-05 Thread Mikhail Khludnev
Hello, You can check ComplexPhrase and Surround query parsers. On Mon, Dec 5, 2016 at 8:12 AM, Yonghui Zhao wrote: > It seems lucene query parser doesn't support SpanNearQuery. > Is there any query parser supports SpanNearQuery? > -- Sincerely yours Mikhail Khludnev

query parser of SpanNearQuery

2016-12-04 Thread Yonghui Zhao
It seems lucene query parser doesn't support SpanNearQuery. Is there any query parser supports SpanNearQuery?

Re: Understanding Query Parser Behavior

2016-11-29 Thread Michael McCandless
Can you try escaping the / character to the query parser? E.g. pass this string instead: String value = "http\\:\\/\\/www.google.com"; Mike McCandless http://blog.mikemccandless.com On Tue, Nov 29, 2016 at 11:38 AM, Peru Redmi wrote: > Hello , > > It would be great

Re: Understanding Query Parser Behavior

2016-11-29 Thread Peru Redmi
tring value = "http\\://www.google.com"; >>> Analyzer anal = new ClassicAnalyzer(Version.LUCENE_30, new >>> StringReader("")); >>> QueryParser parser = new QueryParser(Version.LUCENE_30, "name", >>> anal); >>&g

Re: Understanding Query Parser Behavior

2016-11-28 Thread Peru Redmi
rsion.LUCENE_30, "name", >> anal); >> Query query = parser.parse(value); >> System.out.println(" output terms from query parser ::" + query); > > > >> >> ArrayList list = new ArrayList(); >>

Re: Understanding Query Parser Behavior

2016-11-24 Thread Peru Redmi
l = new ClassicAnalyzer(Version.LUCENE_30, new > StringReader("")); > QueryParser parser = new QueryParser(Version.LUCENE_30, "name", > anal); > Query query = parser.parse(value); > System.out.println(" output terms from query par

Re: Understanding Query Parser Behavior

2016-11-24 Thread Michael McCandless
nt from my LG G4, an AT&T 4G LTE smartphone >>> >>> -- Original message-- >>> *From: *Peru Redmi >>> *Date: *Mon, Nov 21, 2016 10:44 AM >>> *To: *java-user@lucene.apache.org; >>> *Cc: * >>> *Subject:*Understanding Query Parser

Re: Understanding Query Parser Behavior

2016-11-23 Thread Peru Redmi
t;> Sent from my LG G4, an AT&T 4G LTE smartphone >> >> -- Original message-- >> *From: *Peru Redmi >> *Date: *Mon, Nov 21, 2016 10:44 AM >> *To: *java-user@lucene.apache.org; >> *Cc: * >> *Subject:*Understanding Query Parser Behavior >> >> H

Re: Understanding Query Parser Behavior

2016-11-21 Thread Peru Redmi
o: *java-user@lucene.apache.org; > *Cc: * > *Subject:*Understanding Query Parser Behavior > > Hello All ,Could someone explain *QueryParser* behavior on these cases1. > While Indexing ,Document doc = new Document();doc.add(new Field("*Field*", > "*http://www.google.

Re: Understanding Query Parser Behavior

2016-11-21 Thread wmartin...@gmail.com
No Sent from my LG G4, an AT&T 4G LTE smartphone -- Original message--From: Peru RedmiDate: Mon, Nov 21, 2016 10:44 AMTo: java-user@lucene.apache.org;Cc: Subject:Understanding Query Parser Behavior Hello All ,Could someone explain *QueryParser* behavior on these cases1. While Inde

Understanding Query Parser Behavior

2016-11-21 Thread Peru Redmi
Hello All , Could someone explain *QueryParser* behavior on these cases 1. While Indexing , Document doc = new Document(); doc.add(new Field("*Field*", "*http://www.google.com *", Field.Store.YES, Field.Index.ANALYZED)); index has *two* terms - *http* & *www.googl

Re: Query parser and default operator

2016-11-10 Thread Pawel Rog
00/test/_search?pretty' -d '{ "query": { > > "query_string": { "query": "foo AND bar OR baz" , "default_operator": > "or" > > } } , "profile" : true}' | grep luce > > "

Re: Query parser and default operator

2016-11-10 Thread Dawid Weiss
curl -s 'localhost:9200/test/_search?pretty' -d '{ "query": { > "query_string": { "query": "foo AND bar OR baz" , "default_operator": "or" > } } , "profile" : true}' | grep luce > "lucene&qu

Re: Query parser and default operator

2016-11-09 Thread Pawel Rog
baz" , "default_operator": "or" } } , "profile" : true}' | grep luce "lucene" : "+_all:foo +_all:bar _all:baz", ... Elasticsearch uses class called MapperQueryParser which extends org.apache.lucene.queryparser.classic.QueryParser

Re: Query parser and default operator

2016-11-09 Thread Dawid Weiss
Which Lucene version and which query parser is this? Can you provide a test case/ code sample? I just tried with StandardQueryParser and for: sqp.setDefaultOperator(StandardQueryConfigHandler.Operator.AND); dump(sqp.parse("foo AND bar OR baz"

Re: Query parser and default operator

2016-11-09 Thread Pawel Rog
Hi Eric, Thank you for your email. I understand that Lucene queries are not in boolean logic. My point is only that I would expect identical Lucene queries build from the same input string. My intuition says that default operator should not matter in 2 examples I presented in previous email. -- Pa

Re: Query parser and default operator

2016-11-09 Thread Erick Erickson
Lucene queries aren't boolean logic. You can simulate boolean logic by explicitly parenthesizing, here's an excellent blog on this: https://lucidworks.com/blog/why-not-and-or-and-not/ Best, Erick On Wed, Nov 9, 2016 at 1:37 AM, Pawel Rog wrote: > Hello , > I have a query `foo AND bar OR baz`. W

Query parser and default operator

2016-11-09 Thread Pawel Rog
Hello , I have a query `foo AND bar OR baz`. When I use "AND" as a default operator this is the resulting Lucene query: `+test:foo test:bar test:baz` When I use "OR" this is the resulting query `+test:foo +test:bar test:baz` I expected these two return exactly the same Lucene query because I

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

Re: Lucene 6 Query Parser - Does it support multi dimensional space queries?

2016-09-29 Thread Adrien Grand
Everyone, > > I am really passionate about the Multi Dimensional Space Search of Lucene > 6. I am currently using it in one of my projects. It's really good. I want > to know whether the query parser support new multi dimensional space > queries such as LatLon Distance Queries, Mul

Lucene 6 Query Parser - Does it support multi dimensional space queries?

2016-09-26 Thread Janaka Thilakarathna
Hi Everyone, I am really passionate about the Multi Dimensional Space Search of Lucene 6. I am currently using it in one of my projects. It's really good. I want to know whether the query parser support new multi dimensional space queries such as LatLon Distance Queries, Multi Dimensional

How to implement multi term synonym query expansion that support query parser syntax?

2013-05-26 Thread Guy Moshkowich
Hi, I'm looking for a way to implement multi term synonym query expansion i.e., I would like to expend phrase query like "big dog" to return documents containing "big hush puppies". This implementation should support queries with lucene query parser syntax i.e., queries l

RE: Solr query parser, needs to call setAutoGeneratePhraseQueries(true)

2013-02-08 Thread Zhang, Lisheng
I am very sorry, I should have sent to solr user group, not lucene!! Best regards, Lisheng -Original Message- From: Zhang, Lisheng Sent: Friday, February 08, 2013 12:17 PM To: 'java-user@lucene.apache.org' Subject: Solr query parser, needs to call setAutoGeneratePhraseQu

Solr query parser, needs to call setAutoGeneratePhraseQueries(true)

2013-02-08 Thread Zhang, Lisheng
(if I read souce code correctly), but I donot want to do so because this will change the whole behavior of lucene, and I only want to change this query parser behavior, not other lucene features? Please guide me if there is a better way other than to change solr source code? Thanks very much for

Re: Lucene 3.5 Query Parser Question

2012-07-11 Thread Ian Lea
; To do this I'm trying to use the following query: > #* -#[0 TO 9] > > My goal with this query is to look for any word starting with "#" except > for words like "#1". > > However, when I parse this query, the query parser turns it into this: > +content:

Lucene 3.5 Query Parser Question

2012-07-11 Thread Dave Seltzer
Hello, I'm interested in searching a MemoryIndex to find occurrences of HashTags. To do this I'm trying to use the following query: #* -#[0 TO 9] My goal with this query is to look for any word starting with "#" except for words like "#1". However, when I pars

Re: Lucene 4.0: Custom Query Parser newTermQuery(Term term) override

2012-07-11 Thread Jamie
Yonik Thanks for the tip.However, from what I can see, I still need to return a TermQuery specific to each data type. Does anyone know how to convert a string value to TermQuery for each data type? Jamie On 2012/07/11 3:42 PM, Yonik Seeley wrote: On Wed, Jul 11, 2012 at 9:34 AM, Jamie wro

Re: Lucene 4.0: Custom Query Parser newTermQuery(Term term) override

2012-07-11 Thread Yonik Seeley
On Wed, Jul 11, 2012 at 9:34 AM, Jamie wrote: > I am busying attempting to integrate Lucene 4.0 Alpha into my code base. I > have a custom QueryParser that extends QueryParser and overrides > newRangeQuery and newTermQuery Random pointer: for most special case field handling, one would want to ov

Lucene 4.0: Custom Query Parser newTermQuery(Term term) override

2012-07-11 Thread Jamie
Hi Everyone I am busying attempting to integrate Lucene 4.0 Alpha into my code base. I have a custom QueryParser that extends QueryParser and overrides newRangeQuery and newTermQuery to support typed fields. I think I've figured out the newRangeQuery method translation (shown further down belo

Re: When does Query Parser do its analysis ?

2012-02-02 Thread Paul Taylor
;cad6' removing spaces. Now if the query sent to the query parser is just cad 6 there is the issue that it breaks them up into two separate fields , but I thought it that if the query sent to the parser was "cad 6" then the complete string would be passe

Re: When does Query Parser do its analysis ?

2012-02-01 Thread Doron Cohen
if the query sent to the query > parser is just > > cad 6 > > there is the issue that it breaks them up into two separate fields , but > I thought it that if the query sent to the parser was > > "cad 6" > > then the complete string would be passed using

Re: When does Query Parser do its analysis ?

2012-02-01 Thread Paul Taylor
en do (i.e. cad 6) there is a mismatch. Ive now changed my indexing to index the value as 'cad6' removing spaces. Now if the query sent to the query parser is just cad 6 there is the issue that it breaks them up into two separate fields , but I thought it that if the query sent to

Re: When does Query Parser do its analysis ?

2012-02-01 Thread Chris Hostetter
: So it seems like it just broke the text up at spaces, and does text analysis : within getFieldQuery(), but how can it make the assumption that text should : only be broken at whitespace ? whitespace is a significant metacharacter to the Queryparser - it is used to distinguish multiple clauses

Re: When does Query Parser do its analysis ?

2012-02-01 Thread Robert Muir
On Wed, Feb 1, 2012 at 4:32 PM, Paul Taylor wrote: > > So it seems like it just broke the text up at spaces, and does text analysis > within getFieldQuery(), but how can it make the assumption that text should > only be broken at whitespace ? you are right, see this bug report: https://issues.apa

When does Query Parser do its analysis ?

2012-02-01 Thread Paul Taylor
So I subclass Query Parser and give it query dug up then debugging shows it calls getFieldQuery(String field, String queryText, boolean quoted) twice once with queryText=dug and one with queryText=up but then when I run it with query dúg up the first call is queryText=dúg even though

Re: Lucene Query Parser

2011-11-28 Thread Ian Lea
n 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 > always have the highest ranks on top. I cannot find a way to do this with the &g

Lucene Query Parser

2011-11-28 Thread Romiko Derbynew
always have the highest ranks on top. I cannot find a way to do this with the Query Parser API (http://lucene.apache.org/java/2_9_1/queryparsersyntax.html), is this the case, or do I have to succumb to by passing the query parser API and executing a custom sort via groovy on Neo4j? Current Query

Re: Strange change to query parser behaviour in recent versions

2011-08-21 Thread Trejkaz
On Sat, Aug 20, 2011 at 7:00 PM, Robert Muir wrote: > On Sat, Aug 20, 2011 at 3:34 AM, Trejkaz wrote: > >> >> As an aside, Google's behaviour seems to follow the "old" way.  For >> instance, [[ 限定 ]] returns 640,000,000 hits and [[ 限 定 ]] returns >> 772,000,000.  (Interestingly, [[ "限定" ]] return

Re: Strange change to query parser behaviour in recent versions

2011-08-20 Thread Robert Muir
On Sat, Aug 20, 2011 at 3:34 AM, Trejkaz wrote: > > As an aside, Google's behaviour seems to follow the "old" way.  For > instance, [[ 限定 ]] returns 640,000,000 hits and [[ 限 定 ]] returns > 772,000,000.  (Interestingly, [[ "限定" ]] returns 643,000,000 hits. > Slightly more than you might expect.)

Re: Strange change to query parser behaviour in recent versions

2011-08-20 Thread Trejkaz
On Fri, Aug 19, 2011 at 11:05 AM, Chris Hostetter wrote: > > See LUCENE-2458 for the backstory. > > the argument was that while phrase queries were historicly generated by > the query parser when a single (white space deliminated) "chunk" of query > parser input pr

Re: Strange change to query parser behaviour in recent versions

2011-08-18 Thread Chris Hostetter
See LUCENE-2458 for the backstory. the argument was that while phrase queries were historicly generated by the query parser when a single (white space deliminated) "chunk" of query parser input produced multiple tokens, that logic didn't make sense in CJK type langauges wher

Strange change to query parser behaviour in recent versions

2011-08-17 Thread Trejkaz
Hi all. Suppose I am searching for - 限定 In 3.0, QueryParser would parse this as a phrase query. In 3.3, it parses it as a boolean query, but offers an option to treat it like a phrase. Why would the default be not to do this? Surely you would always want it to become a phrase query. The new p

Re: Query Parser, Unary Operators and Multi-Field Query

2011-05-21 Thread Renaud Delbru
On 20/05/11 19:26, Steven A Rowe wrote: cat +dog -fox Selects documents which must contain "dog" and must not contain "fox". Documents will rank higher if "cat" is present, but it is not required." I would have expected such behaviour, whatever "Default Operator" as been defined. But it

RE: Query Parser, Unary Operators and Multi-Field Query

2011-05-20 Thread Steven A Rowe
Hi Renaud, On 5/20/2011 at 1:58 PM, Renaud Delbru wrote: > As said in > , > "if one or more of the terms in a term list has an explicit term operator > (+ or - or relational operator) the rest of the terms will be treated as

Re: Query Parser, Unary Operators and Multi-Field Query

2011-05-20 Thread Renaud Delbru
aud.del...@deri.org] Sent: Friday, May 20, 2011 5:10 AM To: java-user@lucene.apache.org Subject: Query Parser, Unary Operators and Multi-Field Query Hi, The behaviour of the query parser (either the standard lucene query parser, or the query parser contrib) is not what I expect when I am using - un

RE: Query Parser, Unary Operators and Multi-Field Query

2011-05-20 Thread Steven A Rowe
by just switching the default operator to "OR"? Steve > -Original Message- > From: Renaud Delbru [mailto:renaud.del...@deri.org] > Sent: Friday, May 20, 2011 5:10 AM > To: java-user@lucene.apache.org > Subject: Query Parser, Unary Operators and Multi-Field Query

Query Parser, Unary Operators and Multi-Field Query

2011-05-20 Thread Renaud Delbru
Hi, The behaviour of the query parser (either the standard lucene query parser, or the query parser contrib) is not what I expect when I am using - unary operators - a multi-field query - AND as default operator. For example, let say I have two field fieldA and fieldB, and the following

Re: About query parser

2011-03-15 Thread Ahmet Arslan
> For example, i wanna search for 'great sum', and 'great > sum', 'greater sum', ... may be found, and sum great must > not be found. It means I need not only exact word, but also > prefix search (or some other search criteria like fuzzy...). > In my app, I used "great* sum*", but it does not work

About query parser

2011-03-15 Thread Cescy
Hi, I used parser in my app. For example, i wanna search for 'great sum', and 'great sum', 'greater sum', ... may be found, and sum great must not be found. It means I need not only exact word, but also prefix search (or some other search criteria like fuzzy...). In my app, I used "great*

Re: 3.0.3 Contrib Query Parser : Custom Field Name Builder

2011-01-08 Thread Lance Norskog
Bravo! On Fri, Jan 7, 2011 at 10:39 PM, Adriano Crestani wrote: > I created a JIRA to fix this problem: > https://issues.apache.org/jira/browse/LUCENE-2855 > > On Sat, Jan 8, 2011 at 1:32 AM, Adriano Crestani > wrote: > >> Hi Christopher, >> >> Thanks for raising this problem, I always thought a

Re: 3.0.3 Contrib Query Parser : Custom Field Name Builder

2011-01-07 Thread Adriano Crestani
I created a JIRA to fix this problem: https://issues.apache.org/jira/browse/LUCENE-2855 On Sat, Jan 8, 2011 at 1:32 AM, Adriano Crestani wrote: > Hi Christopher, > > Thanks for raising this problem, I always thought a little bit strange to > use CharSequence as map key. Then a just did a little b

Re: 3.0.3 Contrib Query Parser : Custom Field Name Builder

2011-01-07 Thread Adriano Crestani
Hi Christopher, Thanks for raising this problem, I always thought a little bit strange to use CharSequence as map key. Then a just did a little bit of research and found this on CharSequence javadoc: "This interface does not refine the general contracts of the equals

3.0.3 Contrib Query Parser : Custom Field Name Builder

2011-01-07 Thread Christopher St John
I'm trying to: StandardQueryTreeBuilder b = …; b.setBuilder( "myfield", fieldSpecificBuilder); In the debugger I see that the builder is registered in the QueryTreeBuilder's fieldNameBuilders map. When parsing, QueryTreeBuilder.getBuilder tries to look up the builder by using the FieldableNode

Re: Comment in query-parser?

2010-12-30 Thread Federico Fissore
Paul Libbrecht, il 30/12/2010 20:15, ha scritto: [...] Is there anything in the query parser that would be considered ignored till the end of the line? Currently I'm using a fancy field but it introduces a useless query. I would make a CommentFilter and put it in an Analyzer I would gi

Comment in query-parser?

2010-12-30 Thread Paul Libbrecht
I'm more and more involved into preparing dedicated pages that list resources of our servers according to an elaborate query I received in a human description and "implement" as a query-parser query. Doing this I regularly use "indexed-doc" views. The implementation i

Re: Multifield query parser

2010-12-18 Thread Ahmet Arslan
> While searching across multiple fields using > MultiFieldQueryParser, when a > doc is returned how do I know in this doc which field(among > the multiple > fields i queried over) contained the query term? You can extract that info from org.apache.lucene.search.Explanation. http://lucene.apache.

Multifield query parser

2010-12-18 Thread Pankaj Malhotra
Hi, While searching across multiple fields using MultiFieldQueryParser, when a doc is returned how do I know in this doc which field(among the multiple fields i queried over) contained the query term? Regards Pankaj

Re: Questions about the new query parser framework

2010-05-03 Thread Daniel Noll
On Mon, May 3, 2010 at 15:11, Adriano Crestani wrote: > I actually never liked how QueryNode -> query string is done today, using > QueryNode.toQueryString(...) method. A QueryNode shouldn't be responsible > for converting itself back to the string format, because different > SyntaxParser(s) may c

Re: Questions about the new query parser framework

2010-05-02 Thread Adriano Crestani
ed. Best Regards, Adriano Crestani On Sun, May 2, 2010 at 7:47 PM, Daniel Noll wrote: > Hi all. > > I have been using the new query parser framework fairly heavily, > although our use case is largely for *generating* queries rather than > parsing them - the intermediate query node

Questions about the new query parser framework

2010-05-02 Thread Daniel Noll
Hi all. I have been using the new query parser framework fairly heavily, although our use case is largely for *generating* queries rather than parsing them - the intermediate query nodes happened to be a very good model for doing this without all the usual nightmares of thinking about the escape

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
ene 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 release and looks like it might fit our

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

Is it possible to do a PhraseQuery using XML Query Parser?

2010-01-12 Thread syedfa
Dear fellow Java developers: Is it possible to do a PhraseQuery when using the XML Query Parser? I checked the documentation for the XML Query Parser, and it has tags for a multitude of queries, with PhraseQuery absent from the list. Is it possible to do a PhraseQuery using the XMLQueryParser

Need help with XML Query Parser for search form

2009-12-30 Thread syedfa
the words: Without the words: In the XML Query parser example in Lucene 3.0, I set up the demo application, which has a single text field that takes user input. Looking at the example application, I believe that the XSL code to reflect the query for the first text field would look

Re: Need help with XML Query Parser example in Lucene 3.0

2009-12-23 Thread syedfa
. In the "UserQuery" tag in the XSL there is a >> "fieldName" tag which is set to "description". The "jobDescription" >> default fieldname passed to the XML parser would only be in effect for >> any tags that didn't specify a fieldName..

Re: Need help with XML Query Parser example in Lucene 3.0

2009-12-23 Thread syedfa
The "jobDescription" > default fieldname passed to the XML parser would only be in effect for any > tags that didn't specify a fieldName.. > > BTW, in the source distribution there are full "DTDdocs" for the XML > syntax in contrib\xml-query-parser\docs >

Re: Need help with XML Query Parser example in Lucene 3.0

2009-12-23 Thread mark harwood
tags that didn't specify a fieldName.. BTW, in the source distribution there are full "DTDdocs" for the XML syntax in contrib\xml-query-parser\docs Cheers Mark - Original Message From: syedfa To: java-user@lucene.apache.org Sent: Wed, 23 December, 2009 5:03:00 Subje

Re: Need help with XML Query Parser example in Lucene 3.0

2009-12-22 Thread syedfa
wrote: > > Dear fellow Java developers: > > I am trying to run the XML Query Parser example that comes with Lucene 3.0 > source distribution. I have the application structured identical to the > one you download, and I am trying to run it in eclipse. When I launch the > appli

Need help with XML Query Parser example in Lucene 3.0

2009-12-22 Thread syedfa
Dear fellow Java developers: I am trying to run the XML Query Parser example that comes with Lucene 3.0 source distribution. I have the application structured identical to the one you download, and I am trying to run it in eclipse. When I launch the application, fill out the form that appears

New Query Parser: converting a QueryNode back into a String?

2009-11-29 Thread Daniel Noll
Hi all. I've been playing a lot with the new query parser framework, primarily as a means of converting a query structure back into a string. I was hoping that I would be able to use it for the parsing direction as well a bit later, to simply our customisations on the older query parser

Re: Question about the extends the query parser to support NumericField on Lucene 2.9.0

2009-10-27 Thread Luis Alves
ch/document/ef7a9dc1444c9d28/how_do_you_ properly_use_numericfield#de054d728e252174 Sorry, I see no other solution without changing the query parser JavaCC syntax. Maybe the new Contrib QueryParser will handle this better in future (there is an open issue about that). Uwe - Uwe Schindler H.-H.-Meier-Allee 63, D-2

RE: Question about the extends the query parser to support NumericField on Lucene 2.9.0

2009-10-22 Thread Uwe Schindler
To hit the negative number there is no way around putting the number in quotes: age:"-32": http://www.lucidimagination.com/search/document/ef7a9dc1444c9d28/how_do_you_ properly_use_numericfield#de054d728e252174 Sorry, I see no other solution without changing the query parser JavaCC

Question about the extends the query parser to support NumericField on Lucene 2.9.0

2009-10-22 Thread java8964 java8964
Hi, I have a problem to work support the NumericField in query parser. My environment is like this: Windows XP with C:\work\> java -version java version "1.6.0_10" Java(TM) SE Runtime Environment (build 1.6.0_10-b33) Java HotSpot(TM) Client VM (build 11.0-b15, mixed mode, sharing

Re: Query parser fails on Hangul/Korean

2009-08-22 Thread Simon Willnauer
Paul, my frist guess would be that your source file encoding is set to something else than UTF-8. Those characters should be supported by lucene - none of them are > 16bit so I don't see why this should be caused by lucene. I'm pretty sure thats a encoding issues. R u running on windows?! hope th

Query parser fails on Hangul/Korean

2009-08-22 Thread Paul Taylor
public class Issue3341Test extends TestCase { public void testMatchHangul() throws Exception { Analyzer analyzer = new StandardAnalyzer(); RAMDirectory dir = new RAMDirectory(); IndexWriter writer = new IndexWriter(dir, analyzer, true, IndexWriter.MaxFieldLength.LIMITED); Document doc = new Doc

analyzer in surround query parser

2009-07-20 Thread AHMET ARSLAN
I am using Paul's awesome Surround Query Parser that utilizes SpanQuery family. I integrated it into Solr. Nested proximity searches perfectly works. However it seems that it does not use an Analyzer to analyze query words. The main reason I need an analyzer at query time is stemming.

Highlighting in Lucene ( With SrndQuery & Query Parser )

2009-06-02 Thread Radha Sreedharan
Hi all, *Requirment * I have a query of type *SrndQuery *which is parsed by *QueryParser*.On the hit of this query I want to get the region of words around the match. *Approach followed* I used the highlighting logic code as per example usage in << http://lucene.apache.org/java/2_4_1/api/org/apac

Re: robust inverse of query parser?

2009-03-20 Thread Marvin Humphrey
On Fri, Mar 20, 2009 at 05:03:49PM +0100, Paul Libbrecht wrote: > query.toString() does a fair job at being reparsed by QueryParser but > is there a safe way to do so? Probably not. That's certainly not tested or guaranteed. Pathological input would break it. > I have a lucene query object an

robust inverse of query parser?

2009-03-20 Thread Paul Libbrecht
Hello luceners, query.toString() does a fair job at being reparsed by QueryParser but is there a safe way to do so? I have a lucene query object and want a string that QueryParser will reparse fairly exacty. thanks in advance paul smime.p7s Description: S/MIME cryptographic signature

Re: lucene query parser for double-worded term query

2008-06-24 Thread Chris Lu
Erick, Thanks! It's the analyzer problem. I should have used the same analyzer, KeywordAnalyzer, to create the query parser. Thanks a lot! -- Chris Lu - Instant Scalable Full-Text Search On Any Database/Application site: http://www.dbsight.net demo:

Re: lucene query parser for double-worded term query

2008-06-24 Thread Erick Erickson
o > tags:"San\ Francisco" > turns into PhraseQuery, just like tags:"San Francisco", still no results > returned. > > Maybe Lucene Query Parser does not handle this case? > > -- > Chris Lu > - > Instant Scalable

Re: lucene query parser for double-worded term query

2008-06-24 Thread Chris Lu
Yonik, Thanks for your quick reply! But I found after backslash escape spaces, both tags:San\ Francisco tags:"San\ Francisco" turns into PhraseQuery, just like tags:"San Francisco", still no results returned. Maybe Lucene Query Parser does not handle this

Re: lucene query parser for double-worded term query

2008-06-24 Thread Yonik Seeley
ach tag is analyzed into Keyword field like this > new Field("tags", "San Francisco",Field.Store.YES, > Field.Index.UN_TOKENIZED) > > It should be searchable if using TermQuery directly, like > new TermQuery(new Term("tags", "San Francisco"

lucene query parser for double-worded term query

2008-06-24 Thread Chris Lu
like new TermQuery(new Term("tags", "San Francisco")) But how to achieve this via Lucene Query Parser? If using tags:"San Francisco" It's considered a phrase, and turned into term search of tags:San and tags:Francisco, which will not return results. Thank

Re: Custom query parser

2007-11-22 Thread Mike Klaas
On 22-Nov-07, at 8:49 AM, Nicolas Lalevée wrote: Le jeudi 22 novembre 2007, Matthijs Bierman a écrit : Hi Nicolas, Why can't you extend the QueryParser and override the methods you want to modify? Because the query parser I would like to have is a very basic user one, ala google

  1   2   >