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«
>
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
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
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,
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
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
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
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
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
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:
>
("patternreplace",
"pattern", "(movie|film|picture).*",
"replacement", "")
.withTokenizer("standard")
.build();
QueryParser qp = new QueryParser("name", nameAnal
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
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
, 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,
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.
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
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
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
--
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 "轻歌曼舞庆元旦"
igh speed and performance but
>
>
> Japaneese, chinese and korean language not searching properly
> we had use QueryParser
>
>
> QueryParser is splitted into word like "轻歌曼舞庆元旦"
>
>
> Example
>
>
hinese and korean language not searching properly
we had use QueryParser
QueryParser is splitted into word like "轻歌曼舞庆元旦"
Example
This word "轻歌曼舞庆元旦"
split
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
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 "轻歌
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).
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).
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
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
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
-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
, 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
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
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
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
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
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
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
--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
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
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.
: 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
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
: 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
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
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
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
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
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
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
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
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
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
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
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
>
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
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
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
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
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
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
-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
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
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
---
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
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
-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 "
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
- 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
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
), 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
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
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.
>
>
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
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
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
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
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
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
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
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
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
γραψε:
>>>>
>>>> Does your analyzer look for a field called content, not contents?
>>>>
>>>>
>>>> --
>>>> Ian.
>>>>
>>>>
>>>> On Sat, Feb 25, 2012 at 6:37 AM, Damerian
>>>> wrote:
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
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
Στις 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
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
>
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
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
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.
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
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
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) + "
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
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
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
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
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
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
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
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
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 - 100 of 524 matches
Mail list logo