Hi,
I have two pharase queries
messageQuery = new PhraseQuery();
titleQuery = new PhraseQuery();
messageQuery.setSlop(3);
titleQuery.setSlop(1);
for (int i=0; i
Hi,
Does anyone know if lucene can handle complex boolean queries like
the following ones?
1. T: (A OR NOT B)
2. (T:A AND NOT T:B) OR NOT T:C
Cause I figured out in some tests that the results were not really
what I expected.
Thanks in advance,
_
Marcelo Ohashi
I have an index over the titles to .mp3 songs.
It is not unreasonable for the user to want to
see the results from: "Show me Everything".
I understand that title:* is not a valid wildcard query.
I understand that title:[a* TO z*] is a valid wildcard query.
What I cannot understand is this behavi
Why I retrive hits with this query :
+doccontent:avian +doctype:AM +docdate:[2005033122000 TO
2006062022000]
and not with this one
+doccontent:avian influenza +doctype:AM +docdate:[2005033122000 TO
2006062022000]
Did a google serach on the problem when using the range search phrase of
"+datefield:[199801 TO 200512]" (date stored as "MMDD") which
returns 1 million hits.
error: org.apache.lucene.search.BooleanQuery$TooManyClauses
Adding "-Dorg.apache.lucene.maxClauseCount=2400" to java option allowe
Hi,
Need some expert opinion on the following.
Lucene 2.3.2
Scenario on searching:
3 Fields - EXACT, KEYWORD, STEM_KEYWORD
EXACT,KEYWORD - uses KeywordAnalyzer
STEM_KEYWORD - uses SnowballAnalyzer(English)
Searching for each field has it's own queries.
I'm using a BooleanQuery to m
I am new to Lucene and am having problems with booleanQueries. How do you write Boolean OR and AND
queries?
Is this an OR query
booleanQuery.add(query1, BooleanClause.Occur.SHOULD);
booleanQuery.add(query2, BooleanClause.Occur.SHOULD);
and is this an AND query
booleanQuery.add(query1, Boolean
Hi,
I am new to Lucene, so asking some basic question.
Is there any example/reference implementation available of Lucene Usage
using BooleanQuery using API instead of QueryParser?
Cheers
Aamir Yaseen
This e-mail is confidential and should not be used by anyone who is not the
Hi,
I'm trying to build my own query. I want to combine several TermQuery
+ 1 PrefixQuery in a BooleanQuery. The Code looks like this:
BooleanQuery bq = new BooleanQuery();
Term t = new Term("field", "");
t.createTerm("foo");
TermQuery tq = new
For:
BooleanQuery bQuery=new BooleanQuery();
bQuery.add(messageQuery,true,false)
Use:
BooleanQuery bQuery=new BooleanQuery();
bQuery.add(messageQuery, BooleanClause.Occur.MUST);
Mapping is as follows:
For add(query, true, false) use add(query, BooleanClause.Occur.MUST)
For add(query, false
These are not boolean operators, which is often confusing. See the thread
"*Another problem with the QueryParser*"
for an exposition by Chris about how these operate. This may change what you
expect to come back from the parser... If it doesn't, then maybe someone
else can chime in ...
Erick
O
k Erickson [mailto:[EMAIL PROTECTED]
Sent: Wednesday, December 06, 2006 11:56 AM
To: java-user@lucene.apache.org
Subject: Re: BooleanQuery
These are not boolean operators, which is often confusing. See the thread
"*Another problem with the QueryParser*"
for an exposition by Chris about
rick, the stock QP doesn't
quite do
what one (legitimately IMO) expects.
--Renaud
-Original Message-
From: Erick Erickson [mailto:[EMAIL PROTECTED]
Sent: Wednesday, December 06, 2006 11:56 AM
To: java-user@lucene.apache.org
Subject: Re: BooleanQuery
These are not boolean operators, w
On 1 Nov 2005, at 01:43, tcorbet wrote:
I have an index over the titles to .mp3 songs.
It is not unreasonable for the user to want to
see the results from: "Show me Everything".
I understand that title:* is not a valid wildcard query.
I understand that title:[a* TO z*] is a valid wildcard query
tcorbet wrote:
I have an index over the titles to .mp3 songs.
It is not unreasonable for the user to want to
see the results from: "Show me Everything".
I understand that title:* is not a valid wildcard query.
I understand that title:[a* TO z*] is a valid wildcard query.
What I cannot underst
On 1 Nov 2005, at 08:17, Michael D. Curtin wrote:
tcorbet wrote:
I have an index over the titles to .mp3 songs.
It is not unreasonable for the user to want to
see the results from: "Show me Everything".
I understand that title:* is not a valid wildcard query.
I understand that title:[a* TO z
Hi there.
I am a new Lucene user and I have been searching the group archives but
couldn't solve the problem. I have just joined a project that uses Lucene.
We get an error when we issue some of our wildcard text searches.
We use the StandardAnalyzer for indexing our documents and our query is a
: java-user@lucene.apache.org
Subject: BooleanQuery
Why I retrive hits with this query :
+doccontent:avian +doctype:AM +docdate:[2005033122000 TO
2006062022000]
and not with this one
+doccontent:avian influenza +doctype:AM +docdate:[2005033122000 TO
2006062022000
ginal-
De: WATHELET Thomas [mailto:[EMAIL PROTECTED]
Enviado el: miércoles, 21 de junio de 2006 15:40
Para: java-user@lucene.apache.org
Asunto: BooleanQuery
Why I retrive hits with this query :
+doccontent:avian +doctype:AM +docdate:[2005033122000 TO
2006062022000]
and not with thi
Ok thanks a lot.
Before I use TermQuery for the filed doccotent now I use Query object with
QueryParser.parse and it's work perfectly.
-Original Message-
From: Gustavo Comba [mailto:[EMAIL PROTECTED]
Sent: 21 June 2006 16:00
To: java-user@lucene.apache.org
Subject: RE: Boolean
I have a BooleanQuery that looks like this:
BooleanQuery query = new BooleanQuery();
TermQuery term1 = new TermQuery(new Term(ID, "1234"));
TermQuery term2 = new TermQuery(new Term(ID, "2344"));
TermQuery term2 = new TermQuery(new Term(ID, "2323"));
Hi,
I have made a simple class that parse an XML boolean expression to
create predefined query .
Here is an unroll construction from an xml topic which reduce the search
on path "/bssrs" and exclude the file "abstract.htm" :
subsubTermQuery1 = new TermQuery(new Term("FILE", "abstract
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
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
the sorting is so slow, I want to allow the user specifying a
Date-Range. But Lucene throws an BooleanQuery$TooManyClauses[2].
Anywhere I read if you give lucene a higher MaxClauseCount, this will
solve that Problem. But it doesn't work :-(
3. I also read that we should save the Date as YYY
queries? How does one estimate the number of
clauses required for a general query and more specifically on a
range query?
RangeQuery expands under the covers to a BooleanQuery with all
matching terms OR'd together.
In your case, if you've indexed a term for every day in that rang
ange query?
RangeQuery expands under the covers to a BooleanQuery with all matching
terms OR'd together.
In your case, if you've indexed a term for every day in that range
using MMDD then you've got 2,524 terms roughly = 7 * 365 - 31
(minus 31 because you'd omit Dec
Hi Everyone,
I have an index of relatively small size (400mb) , containing roughly
0.7 million documents. The index is actually a copy of an existing
database table. Hence, most of my queries are of the form
" +field1:value1 +field2:value2 +field3:value3. ~20 fields"
I have been running
I don't see a problem with your booleanANDSearch thingy, although
I haven't tried it.
Does toString() return the same string regardless of the value of
booleanANDSearch? That would surprise me. The default
is OR, so the toString output looks like booleanANDSearch is false.
In general, the Lucene
Thanks for the reply. Everything is working correctly now. I jumped the gun without debuging it
more. booleanANDSearch was not getting set correctly.
Erick Erickson wrote:
I don't see a problem with your booleanANDSearch thingy, although
I haven't tried it.
Does toString() return the same stri
uilding your queries directly with the query API. In other words, the
query parser >>is designed for human-entered text, not for
program-generated text.
Is there any sample implementation of Lucene Implementation of
BooleanQuery using API instead of QueryParser?
Cheers
Aamir Yaseen
---
Hi
It's pretty straightforward. Create a BooleanQuery and add other
queries to it e.g.
BooleanQuery bq = new BooleanQuery();
TermQuery tq = new TermQuery(new Term(k, v));
RangeQuery rq = new RangeQuery(new Term(k1, v0),
new Term(k
, Occur.MUST);
Best
Erick
On Mon, Jun 16, 2008 at 4:25 AM, Sascha Fahl <[EMAIL PROTECTED]>
wrote:
> Hi,
>
> I'm trying to build my own query. I want to combine several TermQuery + 1
> PrefixQuery in a BooleanQuery. The Code looks like this:
> BooleanQuery bq = ne
BooleanQuery. BoostingQuery is one such attempt but it's not very
flexible (e.g. the damping is independent of the scores of sub queries).
Does anyone know any other existing examples similar to CustomScoreQuery
but deal with multiple sub queries?
Thanks!
Hello,
I am experiencing a strange behaviour when trying to query the same thing
via
BooleanQuery vs. via the know-it-all QueryParser class. Precisely, the index
contains
the document:
"12,Visual C++,4.2" with the field layout: ID,name,version(thus, "12" is
the ID fi
Hi,
Can a NumericRangeQuery be one of several Queries inside a complex
BooleanQuery? When I do this my NumericRangeQuery seems to
automagically be converted to a TermRangeQuery.
Thanks,
Paul
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
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
The problem I would like to solve is determining the lucene score of a word in
_a particular_ given document. The 2 candidates i have been trying are
- QueryWrapperFilter
- BooleanQuery
Both are to restrict search within a search space. But according to Doug
Cutting QueryWrapperFilter
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
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
; 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
Ids.
Should I be looking at BooleanQuery, QueryFilter or a custom filter?
QueryFilter (or customfilter, as I may pull the id values from a db) seem
like the *best* approach for my scenario. I'm just looking for feedback from
others who have gone this route and what their experiences yielded.
Thanks,
jeff
Hi,
My documents are in the following format.
doc.add(new Field ("id",page, Field.Store.YES, Field.Index.TOKENIZED));
doc.add(new Field ("content",fileContent.toString(), Field.Store.YES,
Field.Index.TOKENIZED, Field.TermVector.WITH_POSITIONS_OFFSETS));
I need to make a query on
On Mittwoch 19 April 2006 22:10, Flávio Marim wrote:
> I am a new Lucene user and I have been searching the group archives but
> couldn't solve the problem.
see
http://wiki.apache.org/jakarta-lucene/LuceneFAQ#head-06fafb5d19e786a50fb3dfb8821a6af9f37aa831
--
http://www.danielnaber.de
--
Normally the default setup for BooleanCluase count is 1024, may be your
query produce more query than 1024, one work around is that you set the
BooleanCluase count to more than 1024. You can do that by just invoking
the static method
BooleanQuery.setMaxClauseCount(2048);
supriya
Flávio Marim
Thanks friends. The problem was solved. I used
BooleanQuery.setMaxClauseCount(Integer.MAX_VALUE) because the value was
really big and so variable that I couldn't determine a consistent top
value.
--
Marim
Supriya Kumar Shyamal disse:
> Normally the default setup for BooleanCluase count is 1024, m
Be careful, especially if you have some test data that you're using to prove
things out and only later will you use the "real" (and usually much larger)
data set. There are two problems that I know of with bumping the clauses to
MAX_VALUE.
1> you can run out of memory.
2> it might take a long time
27;ll need to put the three ID-based TermQuerys into a
sub-BooleanQuery instead of the top-level query. Something like this:
BooleanQuery subquery = new BooleanQuery();
subquery.add(term1, BooleanClause.Occur.Should);
subquery.add(term2, BooleanClause.Occur.Should);
subquery.add(
That worked... thanks!
-Original Message-
From: Michael D. Curtin [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 06, 2006 1:04 PM
To: java-user@lucene.apache.org
Subject: Re: BooleanQuery question
Van Nguyen wrote:
> I just want results that have:
>
> ID: 1234 OR 234
: If I search with boolQuery, Lucene doesn't find anything.
: If I modify by hand the query from "+(-(FILE:abstract.htm))
: +(PATH:/bssrs)" to "-(FILE:abstract.htm) +(PATH:/bssrs)", Lucene find
: the correct list of document.
:
: Does somebody know why ?
you can't have a boolean query containing
In my mind this restriction only apply on a query with just a MUST_NOT
clause and not to a composed query. I've wrong.
thanks a lot,
Nicolas
: If I search with boolQuery, Lucene doesn't find anything.
: If I modify by hand the query from "+(-(FILE:abstract.htm))
: +(PATH:/bssrs)" to "-(FILE:
: In my mind this restriction only apply on a query with just a MUST_NOT
: clause and not to a composed query. I've wrong.
right ... it's an issue for any BooleanQuery, regardless of how that query
may be wrapped in other boolean queries.
Hi
you can't have a boolean query containing only MUST_NOT clauses (which is
what (-(FILE:abstract.htm)) is. it matches no documents, so the mandatory
qualification on it causes the query to fail for all docs.
This is true for the search queries, but it makes sense in a query
filter IMHO. I e
- wrapping a QueryFilter arround a BooleanQuery doesn't change any
intrinsic rules about how a BooleanQuery works -- it just uses the results
in a differnet way.
2) It's trivial to write a Filter that selects all items which do *not*
match a Query -- by writting a Filter that flips
This is more of a design question. I have a ton of email that is
indexed. I need to search based on a date range so I use a RangeQuery
added to a BooleanQuery to search. This works. Now I need to include
another clause that will narrow the result even more. AND on top of
that I will need
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
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
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
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)
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
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)&
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
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
I catch the TooManyClauses Exception in my application, and when I show
the exception message get null value. This behavior is bad I think,
don't help to found cause of errors. Now I use e.getClass() + ": " +
e.getMessage() in my catch statement.
result: org.apache.lucene.search.BooleanQuery$
Wiesbaden
Andreas M. Herberger
mailto: [EMAIL PROTECTED]
http://www.makrolog.de
Harald Stowasser <[EMAIL PROTECTED]>
13.06.2005 13:47
Please respond to
java-user@lucene.apache.org
To
java-user@lucene.apache.org
cc
Subject
TooManyClauses in BooleanQuery
Hello lucene-list readers,
On Jun 13, 2005, at 7:47 AM, Harald Stowasser wrote:
1. Sorting by Date is ruinously slow. So I deactivated it.
How were you sorting by date?
3. I also read that we should save the Date as MMDD-String. I
don't
like this solution, because I don't know that this will work. And
then I
h
[EMAIL PROTECTED] schrieb:
> Hi Harald,
>
> its nice too see, that there are others out there in Germany dealing with
> the same problems as we have been doing in the past years :-)
>
> So for the "too many clauses" problem I have a solution for you, that I
> want to share:
> Just include some
Harald Stowasser schrieb:
P.S.
I tried now to use DateFilter. This works, but is very slow on longer
Date-Ranges. (30sec. )
signature.asc
Description: OpenPGP digital signature
BooleanQuery
[EMAIL PROTECTED] schrieb:
> Hi Harald,
>
> its nice too see, that there are others out there in Germany dealing
with
> the same problems as we have been doing in the past years :-)
>
> So for the "too many clauses" problem I have a solution for you, tha
On Jun 13, 2005, at 8:44 AM, Harald Stowasser wrote:
Harald Stowasser schrieb:
P.S.
I tried now to use DateFilter. This works, but is very slow on longer
Date-Ranges. (30sec. )
Filters in general were meant for one-time creation and caching. If
the date ranges are fixed and the index not
Hi,
Anyone knowledgeable on how to get unique hits using the BooleanQuery?
If I have 2 queries so the when the 1st query is processed then the 2nd
query will not anymore return the same results from the 1st query.
Regards,
Jay Malaluan
--
View this message in context:
http://www.nabble.com
Op Saturday 20 December 2008 15:23:43 schreef Prafulla Kiran:
> Hi Everyone,
>
> I have an index of relatively small size (400mb) , containing roughly
> 0.7 million documents. The index is actually a copy of an existing
> database table. Hence, most of my queries are of the form
>
> " +field1:value
What specifically are you measuring when you time the queries? I've been
mislead by including in my measurement say, creating the response. I realize
that throughput includes assembling the response, but the solution is
different
depending upon whether it's the actual search or what you do with the
Hi,
Here's the code which I am using to time the query:
long startTime = System.currentTimeMillis();
TopDocCollector collector = new TopDocCollector(10);
is.search(query,collector);
ScoreDoc[] hits = collector.topDocs().scoreDocs;
long endTime = System.currentTimeMillis();
Most of the clauses w
Well, you haven't run afoul of the usual suspects, that's pretty
clean timing code. I'm afraid I'll have to defer to the people who
know the internals of Lucene.
Best
Erick
On Sun, Dec 21, 2008 at 10:31 PM, Prafulla Kiran
wrote:
> Hi,
>
> Here's the code which I am using to time the query:
>
for the same term within each
field, combining it via a BooleanQuery/Occur.SHOULD. If a term happens to appear
in both fields, the score is added (and scaled, if disableCoord is false). In my
context this is not really what I want. I would prefer to have a simple
"maximum" functio
ueries in a way different from the
> BooleanQuery. BoostingQuery is one such attempt but it's not very flexible
> (e.g. the damping is independent of the scores of sub queries).
> Does anyone know any other existing examples similar to CustomScoreQuery
> but deal with multiple sub queries?
>
> Thanks!
>
> Jay
>
wrote:
>
> Hello,
>
> I am experiencing a strange behaviour when trying to query the same thing
> via
> BooleanQuery vs. via the know-it-all QueryParser class. Precisely, the index
> contains
> the document:
> "12,Visual C++,4.2" with the field layout: I
Indeed, StandardAnalyzer removing the pluses, so analyse 'c++' to 'c'.
QueryParser include Term that been analysed.
And BooleanQuery include Term that hasn't been analysed.
I think this is the difference between they.
2008/9/4 Ian Lea <[EMAIL PROTECTED]>
> Hav
Hi !
I spent all night trying to get a simple BooleanQuery working and I really
can't figure out what is my problem. See this very simple program :
public class test {
@SuppressWarnings("deprecation")
public static void main(String[] args) throws ParseException,
Corrup
-28213 Bremen
http://www.thetaphi.de
eMail: u...@thetaphi.de
> -Original Message-
> From: Murdoch, Paul [mailto:paul.b.murd...@saic.com]
> Sent: Friday, April 16, 2010 8:11 PM
> To: java-user@lucene.apache.org
> Subject: NumericRangeQuery in BooleanQuery
>
>
Yes and no. I extended the QueryParser and overrode the getRangeQuery method
to let it build NRQ. When parsing a BooleanQuery containing NRQ using the
extended QueryParser the overridden getRangeQuery was never being called. I
think it was still using the QueryParser's. In the en
Hi @all,
I'm a little confused about the behaviour of BooleanQuery. I have a custom
parser that analyzes some text and constrcuts an "ANDed" BooleanQuery. toString
delivers something like this:
(+field1:term1 +field2:term2)
Looks pretty normal to me, but the problem is it deli
at
have both A and B, and ranks them higher if they also have C D or E.
I'm wondering how this translates to a BooleanQuery. I know I should use
BooleanClause.Occur.MUST for A and B, and I guess I should use
BooleanQuery.Occur.SHOULD for C, D and E. However the javadocs for
BooleanClause
I'm trying to create a fairly complex SpanQuery from a binary parse tree.
I create SpanOrQueries from SpanTermQueries and combine SpanOrQueries into
BooleanQueries. So far, so good.
The problem is that I don't see how to create a SpanNotQuery from a
BooleanQuery and a SpanTermQuery.
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
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
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
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
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,
f
it is in lucene, read
http://wiki.apache.org/lucene-java/ImproveSearchingSpeed
--
Ian.
On Wed, Sep 21, 2011 at 5:38 PM, Peyman Faratin wrote:
> Hi
>
> The problem I would like to solve is determining the lucene score of a word
> in _a particular_ given document. The 2 candidates i ha
Hi Ian
I am not analyzing the title
Field titleField = new Field("title", article.getTitle(),Field.Store.YES,
Field.Index.NOT_ANALYZED);
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)?
t of synch
somewhere.
What does Luke show? See
http://wiki.apache.org/lucene-java/LuceneFAQ#Why_am_I_getting_no_hits_.2BAC8_incorrect_hits.3F
for more things to check.
> Do you think booleanquery is the right approach for solving the problem
> (finding lucene score of a word or a phrase in _a_
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
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
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.
-
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
-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 "
1 - 100 of 304 matches
Mail list logo