y.I am encounterd by a question about the execution
> of BooleanQuery:although,BooleanQuery#rewrite has done some works to
> remove duplicate FILTER,SHOULD clauses.however still the same term query
> can been executed the several times.
>
> I copy the test code in the Tes
Hi All
During my unemployment time ,the happiest thing is diving to study the
Lucene Source Code ,thanks for all the work .
About the BooleanQuery.I am encounterd by a question about the execution
of BooleanQuery:although,BooleanQuery#rewrite has done some works to
remove duplicate FILTER
020, 08:43:59 AM EST, Erick Erickson
> wrote:
>
> Nissim:
>
>Here’s a good explanation of why it was designed this way
>if you’d like details:
>
>https://lucidworks.com/post/why-not-and-or-and-not/
>
>Don’t be put off by the Solr title, it’s really about
>BooleanQu
really about
BooleanQuery and BooleanClause
Best,
Erick
> On Nov 6, 2020, at 8:17 AM, Adrien Grand wrote:
>
> Hi Nissim,
>
> This is by design: boolean queries that don't have positive clauses like
> empty boolean queries or boolean queries that only consist of negative
>
Nissim:
Here’s a good explanation of why it was designed this way
if you’d like details:
https://lucidworks.com/post/why-not-and-or-and-not/
Don’t be put off by the Solr title, it’s really about
BooleanQuery and BooleanClause
Best,
Erick
> On Nov 6, 2020, at 8:17 AM, Adrien Grand wr
ers,
> I have found that constructing a BooleanQuery with just
> a BooleanClause.Occur.MUST_NOT will return no results. It will return
> results is if there is also a BooleanClause.Occur.MUST as part of the query
> as well though.
>
>
> I don't see this limit
Hello Apache Lucene team members,
I have found that constructing a BooleanQuery with just a
BooleanClause.Occur.MUST_NOT will return no results. It will return results is
if there is also a BooleanClause.Occur.MUST as part of the query as well though.
I don't see this limitation w
Hi Patrick,
I don't think Lucene supports CNF or DNF for BooleanQuery?
BooleanQuery will try to do some rewriting simplifications for degenerate
cases, e.g. a BooleanQuery with a single clause. Probably it could do more
optimizing? It is quite complex already :)
Mike
On Tue, Sep 22, 20
Hi there,
Does Lucene support normalizing a BooleanQuery into normalized form (like
CNF or DNF)?
If not, is there a suggested way of doing it?
Also, I wonder whether there'll be a performance difference between
different forms of essentially the same BooleanQuery?
Thanks
Patrick
xed for field 'countryDFLT' (let alone both). Do the individual
building blocks, eg. "countryDFLT:united" return any results?
On Thu, Jun 27, 2019 at 4:33 PM wrote:
Hi,-
Any ideas on what might be happening?
maybe i am missing, is there an api to look into each contribution of
score
ng this query on does not
seem to have a document where either 'united' or 'states' has been
indexed for field 'countryDFLT' (let alone both). Do the individual
building blocks, eg. "countryDFLT:united" return any results?
On Thu, Jun 27, 2019 at 4:33 PM wrot
, eg. "countryDFLT:united" return any results?
On Thu, Jun 27, 2019 at 4:33 PM wrote:
Hi,-
Any ideas on what might be happening?
maybe i am missing, is there an api to look into each contribution of
score into total scrore from the booleanquery?
Best regards
On 6/26/19 2:29 PM, Ba
#x27; has been
> indexed for field 'countryDFLT' (let alone both). Do the individual
> building blocks, eg. "countryDFLT:united" return any results?
>
> On Thu, Jun 27, 2019 at 4:33 PM wrote:
>>
>> Hi,-
>>
>> Any ideas on what might be happ
x27;countryDFLT' (let alone both). Do the individual
building blocks, eg. "countryDFLT:united" return any results?
On Thu, Jun 27, 2019 at 4:33 PM wrote:
>
> Hi,-
>
> Any ideas on what might be happening?
>
> maybe i am missing, is there an api to look into each contribu
Hi,-
Any ideas on what might be happening?
maybe i am missing, is there an api to look into each contribution of
score into total scrore from the booleanquery?
Best regards
On 6/26/19 2:29 PM, Baris Kazar wrote:
All must queries (and the rest of course) work ok when i search MAINK, MAINL
booleanquery separately and then
manually post process them.
or my query plan is still not good enough to catch MAIN when i search with
street MAINS, city NASUA, municipality HILLSBOROUGH, state NEW HAMPSHIRE,
cuntry UNITED STATES
where the first two are fuzzy as they are have errors in them and
ery’s type (phrase, term etc).
> >
> > Could you post your query and the explain plan of IndexSearcher post the
> > rewrite?
> >
> > On Wed, 26 Jun 2019 at 6:46 PM, wrote:
> >
> >> Hi,-
> >>
> >>how can one find out each score c
This is a nested (2-level in this case) booleanquery.
Best regards
On 6/26/19 1:06 PM, baris.ka...@oracle.com wrote:
Sure, here is the query plan: (i cant run explain plan as it does not
give me anything)
[+streetDFLT:maink~2 (streetDFLT:"maine")^0.35, +cityDFLT:nasua~2
(cityD
ery and the explain plan of IndexSearcher post the
rewrite?
On Wed, 26 Jun 2019 at 6:46 PM, wrote:
Hi,-
how can one find out each score contribution from booleanquery
components?
Best regards
-
To unsubscribe, e-mail: ja
ach score contribution from booleanquery
> components?
>
> Best regards
>
>
> -
> To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org
> For additional commands, e-mail: java-user-h...@lucene.apache
Hi,-
how can one find out each score contribution from booleanquery components?
Best regards
-
To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org
For additional commands, e-mail: java-user-h...@lucene.apache.org
()?
> > Unfortunately this is illegal: queries must implement scorer(). Today,
> > conjunctions never use the bulkScorer API.
> >
> > Le mer. 25 juil. 2018 à 18:47, Vadim Gindin a
> > écrit :
> >
> > > Hi all!
> > >
> > >
dim Gindin a
> écrit :
>
> > Hi all!
> >
> > I have the following BooleanQuery (JSON representation as it is defined
> in
> > Elasticsearch):
> >
> > {
> > "query" : {
> > &qu
following BooleanQuery (JSON representation as it is defined in
> Elasticsearch):
>
> {
> "query" : {
> "bool" : {
> "must" : {
> "custom_query" : { // has own bulkScorer() imp
Hi all!
I have the following BooleanQuery (JSON representation as it is defined in
Elasticsearch):
{
"query" : {
"bool" : {
"must" : {
"custom_query" : { // has own bulkScorer() implementation
Hi,-
i have an indexed field having "$word1 word2" and i want to find the
docs having these two words first in my first query.
i have another indexed field but i am not searching on that second
field for this first query
which is BooleanQuery with two TermQuer
t; 0.75 = parameter b
> 28.2 = avgFieldLength
> 28.45 = fieldLength"
>
>
>
>
>
> How to know the matching fields from an Explanation Object?
>
>
> Regards,
> Ranganath B. N.
>
>
> -----Original Message-
> From: Adri
ds from an Explanation Object?
Regards,
Ranganath B. N.
-Original Message-
From: Adrien Grand [mailto:jpou...@gmail.com]
Sent: Thursday, June 22, 2017 12:55 PM
To: java-user@lucene.apache.org
Subject: Re: Get matching fields from a BooleanQuery
Hi Frederik,
Using explain should be fine fo
everyone,
>
> To start, we are using Lucene 4.3.
>
> To search, we prepare several queries and combine these into a
> BooleanQuery.
> What we are looking for is a way to determine on which specific fields a
> certain document matched.
> For example, I create 2 queries: one t
Hey everyone,
To start, we are using Lucene 4.3.
To search, we prepare several queries and combine these into a BooleanQuery.
What we are looking for is a way to determine on which specific fields a
certain document matched.
For example, I create 2 queries: one to search in the "Name"
On Mon, Apr 3, 2017 at 6:25 PM, Adrien Grand wrote:
> Large boolean queries can cause a lot of random access as each sub clause
> is advanced one after the other. Even in the case that everything fits in
> the filesystem cache, the fact that the heap needs to be rebalanced after
> each documents m
eaf is returned. Which
> is confusing, and seems backwards.
>
> As an alternative, we could override rewrite(IndexReader) and return a
> gigantic boolean query. Problems being:
>
> 1) A gigantic BooleanQuery takes up a lot more memory than a list of
> query strings.
>
>
, the larger doc ID
set is sliced so that the sub-slice for that leaf is returned. Which
is confusing, and seems backwards.
As an alternative, we could override rewrite(IndexReader) and return a
gigantic boolean query. Problems being:
1) A gigantic BooleanQuery takes up a lot more memory than a
Oliver,
worked perfectly!
Thanks a lot !
Best regards,
Humberto
On Thu, Nov 10, 2016 at 8:37 AM, Oliver Kaleske wrote:
> Hi,
>
> try
> BooleanQuery inner = new BooleanQuery.Builder().add(ownerQueryX,
> Occur.SHOULD).add(groupQueryY, Occur.SHOULD).build();
>
Hi,
try
BooleanQuery inner = new BooleanQuery.Builder().add(ownerQueryX,
Occur.SHOULD).add(groupQueryY, Occur.SHOULD).build();
BooleanQuery constrainedQuery = new BooleanQuery.Builder().add(inner,
Occur.MUST).add(query, Occur.MUST).build();
You can also split this into several
Hi,
In Lucene 4.9.0 i have:
QueryParser parser = new QueryParser("contents",analisador);
Query query = parser.parse(parametro);
BooleanQuery constrainedQuery = new BooleanQuery();
BooleanQuery inner = new BooleanQuery();
inner.add(ownerQueryX, Oc
And this works with Lucene 6.2
--
View this message in context:
http://lucene.472066.n3.nabble.com/How-to-build-a-Lucene-BooleanQuery-tp4297102p4297153.html
Sent from the Lucene - Java Users mailing list archive at Nabble.com
, BooleanClause.Occur.MUST);
builder.add(subQuery2, BooleanClause.Occur.MUST_NOT);
BooleanQuery bq = builder.build();
--
View this message in context:
http://lucene.472066.n3.nabble.com/How-to-build-a-Lucene-BooleanQuery-tp4297102p4297150.html
Sent from the Lucene - Java Users
age-
> From: Chaitanya Kumar Ch [mailto:chaitu381...@gmail.com]
> Sent: Wednesday, September 21, 2016 1:20 PM
> To: java-user@lucene.apache.org
> Subject: Re: How to build a Lucene BooleanQuery?
>
> I am able to create BooleanQuery using
> BooleanQuery categoryQuery = ne
I am able to create BooleanQuery using
BooleanQuery categoryQuery = new BooleanQuery();
I don't understand why you said it does not exist.
On Wed, Sep 21, 2016 at 4:39 PM, szzoli wrote:
> Thank you.
>
> This is almost the solution, but how can I build a BoolesanQuery?
> T
Try
BooleanQuery.Builder builder = new BooleanQuery.Builder();
builder.add(subQuery1, occur1);
builder.add(subQuery2, occur2);
// ...
BooleanQuery query = builder.build();
-Ursprüngliche Nachricht-
Von: szzoli [mailto:reg9sz...@freemail.hu
Thank you.
This is almost the solution, but how can I build a BoolesanQuery?
The
BooleanQuery categoryQuery = new BooleanQuery();
does not exist, the
builder.createBooleanQuery(field, queryString);
creats a TermQuery.
--
View this message in context:
http://lucene.472066.n3.nabble.com/How
May be it
<http://stackoverflow.com/questions/20204726/lucene-or-search-using-boolean-query>helps
you.
On Wed, Sep 21, 2016 at 4:11 PM, szzoli wrote:
> Hi,
>
> I would like to build a BooleanQuery. This migt be simple, but I cannot
> find
> the way how to do it.
> I
Hi,
I would like to build a BooleanQuery. This migt be simple, but I cannot find
the way how to do it.
It is also silly that the function
builder.createBooleanQuery(field, queryString, BooleanClause.Occur.MUST);
builds a TermQuery.
How can I bild such a query like
"fox MUST dog MUST_NOT&qu
re any query similar to BooleanQuery with SHOULD semantics that prefer
> documents where the terms are close to each other?
> I currently use a PhraseQuery with large slop for this. However this only
> works if all the terms are in the document.
>
>
Hi,
Is there any query similar to BooleanQuery with SHOULD semantics that prefer
documents where the terms are close to each other?
I currently use a PhraseQuery with large slop for this. However this only
works if all the terms are in the document.
Best regards,
Erel Uziel
lly diff
> > query that won't match as many documents as the original.
> >
> > in that example, you could decrement minshouldmatch (=1) ... but i'm not
> > sure off that holds as a general rule for all possible
> permutations/values
> > ... i'd have
t;
> > in that example, you could decrement minshouldmatch (=1) ... but i'm not
> > sure off that holds as a general rule for all possible
> permutations/values
> > ... i'd have to think about it.
> >
> > An interesting edge case to think about is "(X X Y #X)&
ut is "(X X Y #X)" w/minshouldmatch=2
> ... pretty sure that would give you very diff scores if you rewrote it to
> "(+X X Y)" (or "(+X Y)") w/minshouldmatch=1
>
>
>
> : Hello all, I noticed while debugging a query that BooleanQuery will
> : re
le for all possible permutations/values
> ... i'd have to think about it.
>
> An interesting edge case to think about is "(X X Y #X)" w/minshouldmatch=2
> ... pretty sure that would give you very diff scores if you rewrote it to
> "(+X X Y)" (or "(+X Y)
se to think about is "(X X Y #X)" w/minshouldmatch=2
... pretty sure that would give you very diff scores if you rewrote it to
"(+X X Y)" (or "(+X Y)") w/minshouldmatch=1
: Hello all, I noticed while debugging a query that BooleanQuery will
: rewrite itself to remo
ot;(X X Y #X)" w/minshouldmatch=2
... pretty sure that would give you very diff scores if you rewrote it to
"(+X X Y)" (or "(+X Y)") w/minshouldmatch=1
: Hello all, I noticed while debugging a query that BooleanQuery will
: rewrite itself to remove FILTER clauses that
Hello all,
I noticed while debugging a query that BooleanQuery will rewrite itself to
remove FILTER clauses that are also MUST as an optimization/simplification,
which makes total sense. So (+f:x #f:x) will become (+f:x).
However, shouldn't there also be another optimization to remove F
I got the answer.
Somehow I missed it.
The PhraseQuery requires the terms to be in a fixed order whereas the
BooleanQuery does not require the terms to be
in a particular order.
On Thu, Mar 31, 2016 at 3:07 PM, Sachin Kulkarni
wrote:
> Hi,
>
> I am using Lucene-5.0.0.
> If I had
Hi,
I am using Lucene-5.0.0.
If I had a qurey "New York" and if I use the BooleanQuery with the
BooleanClause set to MUST on the two terms, is it the same as dong a
PhraseQuery with the two terms?
I am doing some 2-gram type queries and they are giving me different
results with these t
Hi,
I'm facing the problem solve to which appears to be just few simple lines
but i cannot manage to find them.
I'm using Lucene, 5.4.0
What I'm trying to do is to compose a complex BooleanQuery and at the end I
need to find an intersection of all subqueries without summing scor
and I am struck
> during the last step
> 1. Construct a BooleanQuery
> 2. Serialize BooleanQuery into a String
> 3. De-Serialize a String into a BooleanQuery (or a Query) on a
> different machine.
>
> Eg : Lets say from step(2) I got the below string.
> +contents:maxI
Hi,
I am trying to accomplish the below sequence of tasks and I am struck
during the last step
1. Construct a BooleanQuery
2. Serialize BooleanQuery into a String
3. De-Serialize a String into a BooleanQuery (or a Query) on a
different machine.
Eg : Lets say from step(2) I got the
(I'm using Lucene 4.9.0)
I've been doing some perf testing of MemoryIndex, and have found that it is
much slower when a BooleanQuery contains a non-required clause, compared to
when it just contains required clauses.
Most of the time is spent in BooleanScorer, which as far as I can
y.toStirng() method, like:
(termA termB) termC
it can be "termA termC" OR "termB termC"
So my question is, how can I rewrite MultiPhraseQuery to BooleanQuery with
PhraseQuery clauses or something else to get matched terms. Can it possible
at all and will these queries equal (scoring,
Are you asking if your two suggestions
1) a MultiPhraseQuery or
2) a BooleanQuery made up of multiple PhraseQuery instances
are equivalent? If so, I'd say that they could be if you build them
carefully enough. For the specific examples you show I'd say not and
would wonder if you g
olate"));
> q.add(new Term[] {new Term("body", "pie"), new Term("body", "tart")});
> assertEquals(2, searcher.search(q, 1).totalHits);
> r.close();
> indexStore.close();
>
> I need to know on which phrase query will be match. Explanat
t;), new Term("body", "tart")});
assertEquals(2, searcher.search(q, 1).totalHits);
r.close();
indexStore.close();
I need to know on which phrase query will be match. Explanation doesn't
return exact information, only that is match by this query. So can I rewrite
this query to Bo
t;), new Term("body", "tart")});
assertEquals(2, searcher.search(q, 1).totalHits);
r.close();
indexStore.close();
I need to know on which phrase query will be match. Explanation doesn't
return exact information, only that is match by this query. So can I
rewrite this query to Bo
Hi,
thank you for your explanation!
I used a wrapped BooleanQuery instead, this turned out to be a lot faster.
Christoph
Am 16.12.2013 15:19, schrieb Uwe Schindler:
Hi,
The problem with BooleanFilter is its implementation:
It creates BitSets and AND/ORs them together. The BitSets are created
you have Queries that only match little documents, the other
queries can then advance and leave out the doc ids not matching. BooleanFilter
has to get all matching docIds from all filters.
If you want it fast, use BooleanQuery and wrap it with ConstantScoreQuery. Then
there is also no scoring
Hi all,
from my tests on an index with 22 million entries, it seems that in many
cases a BooleanFilter is a lot slower than an equivalent BooleanQuery.
Is this the expected behaviour? i would have expected a Filter to be at
least as fast as a query, since it basically does the same thing, but
in the results.
>
> Since then, however, we've needed to query more flexibly, using a
> BooleanQuery to merge several subqueries (in order to apply different
> analyzers to different fields/field groups). As a result, we've had to
> switch to Operator.OR, since there w
Initially, I queried our (v4.4) index with a single MultiFieldQueryParser and
Operator.AND to ensure that all search terms appeared in the results.
Since then, however, we've needed to query more flexibly, using a BooleanQuery
to merge several subqueries (in order to apply different anal
it to a SpanQuery using
SpanMultiTermQueryWrapper.
Answer b) seems intuitively the way to go there, but I don't quite find
the correct path there because the filter does not work as intended (see
my previous post).
Answer a) does not seem feasible here either because
SpanMultiTermQueryWrapper requires a MultiTerm
; docBase"
[1] in which Uwe suggests not to use QueryWrapperFilter, but to use
another Query and to combine it using a Boolean Query in such a
scenario, if I understand correctly. Does this still claim for Lucene 4.0?
However, I am not sure how to use a BooleanQuery here because I need the
SpanQuery result.
An
Any ideas on this? Thanks!
--
View this message in context:
http://lucene.472066.n3.nabble.com/Using-coord-of-one-BooleanQuery-as-a-multiplier-for-its-siblings-tp4003736p4007675.html
Sent from the Lucene - Java Users mailing list archive at Nabble.com
Ah yes, that is what I meant by coord = 1. Coord is disabled for BQ0 and BQ2.
--
View this message in context:
http://lucene.472066.n3.nabble.com/Using-coord-of-one-BooleanQuery-as-a-multiplier-for-its-siblings-tp4003736p4006220.html
Sent from the Lucene - Java Users mailing list archive at
On Mon, Aug 27, 2012 at 8:31 PM, pranshu sharma wrote:
> Hi there,
>
> I had a question about migrating the coord value one level up. My current
> query structure has a root BooleanQuery with a bunch of nested BooleanQuery
> children: one of these looks for all terms in the quer
Hi there,
I had a question about migrating the coord value one level up. My current
query structure has a root BooleanQuery with a bunch of nested BooleanQuery
children: one of these looks for all terms in the query issued, and I want
to apply the coord factor for this BooleanQuery to all its
@lucene.apache.org
Subject: Use an analyzer with Term, FuzzyQuery, BooleanQuery and friends
Hello list
I build my queries programmatically with Term, NumericTerm, FuzzyQuery,
BooleanQuery etc. In particular, I do not use QueryParser to build my query
from a string. Still, I would like to
Hello list
I build my queries programmatically with Term, NumericTerm, FuzzyQuery,
BooleanQuery etc. In particular, I do not use QueryParser to build my query
from a string. Still, I would like to first run the values for my terms through
an analzyer (more precisely, the same analyzer that I
August 23, 2012 9:13 AM
To: java-user@lucene.apache.org
Subject: Re: Question about BooleanQuery
OK, it's not the idea that the nested NOT query has got anything to do with
booleanField_1, so I'll try to phrase very clearly what I want :
the query should return docs where
( someField
this message in context:
http://lucene.472066.n3.nabble.com/Question-about-BooleanQuery-tp4002822p4002854.html
Sent from the Lucene - Java Users mailing list archive at Nabble.com.
-
To unsubscribe, e-mail: java-user-unsubscr...@lu
cene.apache.org
Subject: Re: Question about BooleanQuery
thanks Jack for your answer, however I'm not quite sure what to do with it:
the query is like
+( someField_1:0 someField_2:0 )
+booleanField_1:false
-(
+( someField_1:0 someField_2:0 )
+booleanField_2:true
)
(I put
http://lucene.472066.n3.nabble.com/Question-about-BooleanQuery-tp4002822p4002836.html
Sent from the Lucene - Java Users mailing list archive at Nabble.com.
-
To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org
For addition
Step 1, fully parenthesize your boolean to show your desired order of
execution. The Lucene BooleanQuery does not do a pure Boolean evaluation.
You have the same sub-expression in your NOT clause - that's probably what
guarantees zero results. And you have an unmatched right parenthesis a
View this message in context:
http://lucene.472066.n3.nabble.com/Question-about-BooleanQuery-tp4002822.html
Sent from the Lucene - Java Users mailing list archive at Nabble.com.
-
To unsubscribe, e-mail: java-user-unsubscr...@l
Hi Trejkaz,
I am using the Standard Analyzer for my indexing. Can you provide an
example with which I can use the BooleanQuery to add both the fields in the
same forms and yet the documents are searched?
I would be really grateful if you can provide example for parsing the text
as well which is
On Mon, Jul 23, 2012 at 10:16 PM, Deepak Shakya wrote:
> Hey Jack,
>
> Can you let me know how should I do that? I am using the Lucene 3.6 version
> and I dont see any parse() method for StandardAnalyzer.
In your case, presumably at indexing time you should be using a
PerFieldAnalyzerWrapper with
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
The query parser/analyzer is lower-casing the query terms automatically. You
have to do the same with with terms for BooleanQuery - Term("cs-method",
"GET") should be "Term("cs-method", "get")".
StandardAnalyzer is doing the lower-casing.
-
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
th this analyzer.
In the code attached to "searchExpresion" is the phrase containing the words
entered to search by the end user. I do search containing all the words, or any
of the words or the whole phrase. This method makes my object "BooleanQuery"
only for the content (f
arch using any analyzed field with BrazilianAnalyzer,
> always a return empty result (zero docs). I do test in separeted solution
> with a unique field with Brazilian Analyzer in indexing and searching. If
> use a BooleanQuery and not queryparse, don't works as expected. Return
> empty
ution with a
unique field with Brazilian Analyzer in indexing and searching. If use a
BooleanQuery and not queryparse, don't works as expected. Return empty
result.
When change for StandardAnalyzer on Indexing and Serching, without alter
other parts of code, works.
Could anyone help
don Mintern wrote:
>
>> 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 ab
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
I guess you're confusing it with MUST (MUST_NOT) logic. Try creating
the query you want to exclude without MUST_NOT and add it to the
BooleanQuery with MUST_NOT. That sounds very confusing.
For example
BooleanQuery bq = new BooleanQuery();
TermQuery tqwanted = new TermQuery(new Term(&q
Hi,
I have a problem when using BooleanQuery with NOT-Operators.
When I want to search my documents for elements where a special field is NOT a
special value AND another field is a special value, I do the following in my
code:
Query query1 = ...; // -field1:value1
Query query2=...; // field2
tting_no_hits_.2BAC8_incorrect_hits.3F
> for more things to check.
i'll walk through them as soon as i can.
>
>> Do you think booleanquery is the right approach for solving the problem
>> (finding lucene score of a word or a phrase in _a_ particular document)?
>
> So
1 - 100 of 304 matches
Mail list logo