Right another level of BooleanQuery that is a SHOULD clause, with TWO terms:
a MUST of MatchAllDocsQuery and a MUST_NOT of the TermRangeQuery for
"allergies" with null for both start and end.
Actually, there is a new filter that you can use to detect empty fields down
at that level. See
https
This is the QueryParser syntax, right? So an API equivalent for the not
null case would be something like this?
BooleanQuery q = new BooleanQuery();
q.add(new BooleanClause(new TermQuery(new Term("first_name", "Zed")),
Occur.SHOULD));
q.add(new BooleanClause(new TermRangeQuery("allergies", null, n
"OR allergies IS NULL" would be "OR (*:* -allergies:[* TO *])" in
Lucene/Solr.
-- Jack Krupansky
-Original Message-
From: Vitaly Funstein
Sent: Thursday, October 25, 2012 8:25 PM
To: java-user@lucene.apache.org
Subject: Re: query for documents WITHOUT a field?
Sorry for resurrecting
Sorry for resurrecting an old thread, but how would one go about writing a
Lucene query similar to this?
SELECT * FROM patient WHERE first_name = 'Zed' OR allergies IS NULL
An AND case would be easy since one would just use a simple TermQuery with
a FieldValueFilter added, but what about other bo
On Thu, Oct 25, 2012 at 7:11 AM, Paul Taylor wrote:
> In a music database have an index of releases and a separate indexes of
> artists, usually the user just searches artists or releases. But sometimes
> they want to search all and interleave the results from the two indexes, but
> its not sens
https://wiki.apache.org/lucene-java/LuceneFAQ#Can_I_filter_by_score.3F
https://wiki.apache.org/lucene-java/ScoresAsPercentages
The fundemental problem of attempting to compare scores for different
searches is the same in your situation as in the goal of trying to
"normalize" scores to a fixed r
I almost added that you could create a subclass of the Lucene query parser,
as Solr does, and add the aliasing that way. There might/should be field
aliasing code in Solr that you could easily apply in Solr. There really
isn't a great reason why aliasing is only available in Solr and not in
Luc
Hi Jack
Thank you for your help.
My problem is, I have only a Lucene setup and can not switch to Solr : (
Cheers
Willi
Von: Jack Krupansky
An: java-user@lucene.apache.org
Gesendet: 15:57 Donnerstag, 25.Oktober 2012
Betreff: Re: How to use/create an alias t
Thanks Guys,
The resources seem to be through enough :)
On 25.10.2012 г. 16:57, Ian Lea wrote:
>From http://lucene.apache.org/core/4_0_0/MIGRATE.html
TermPositions is renamed to DocsAndPositionsEnum, and no longer
extends the docs only enumerator (DocsEnum).
And the link is probably the answe
With edismax in Solr 3.6/4.0 field aliases are supported:
"The syntax for aliasing is f.myalias.qf=realfield. A user query for
myalias:foo will be queried as realfield:foo."
See:
http://wiki.apache.org/solr/ExtendedDisMax#Field_aliasing_.2BAC8_renaming
-- Jack Krupansky
-Original Message
Have you looked at or decided against an approach like Solr's
ExternalFileField?
See:
http://lucene.apache.org/solr/4_0_0/solr-core/org/apache/solr/schema/ExternalFileField.html
Is that at least the kind of issue you are trying to deal with?
One final question: How much of a document's field v
Could you provide a more concrete definition of what you mean by "absolute
scoring"? I mean, you can implement your own scoring or "similarity", so
what exact criteria are you proposing?
Try providing a concise example of a couple of documents and a couple of
searches and how your propose to s
>From http://lucene.apache.org/core/4_0_0/MIGRATE.html
TermPositions is renamed to DocsAndPositionsEnum, and no longer
extends the docs only enumerator (DocsEnum).
And the link is probably the answer to your second question.
--
Ian.
On Thu, Oct 25, 2012 at 2:50 PM, Ivan Vasilev wrote:
> Hy G
On Thu, Oct 25, 2012 at 9:50 AM, Ivan Vasilev wrote:
> Hy Guys,
>
> In previous versions of Lucene there was a class TermPositions that could be
> obtained form IndexReader.
> Is there something that replaces it in Lucene 4.0.0?
>
> Also is there some documentation that describes how to use Lucene
Did you also find the response to that question?
http://mail-archives.apache.org/mod_mbox/lucene-java-user/200801.mbox/%3c81162.81463...@web50303.mail.re2.yahoo.com%3E
Hard to think of any other ways than those mentioned there.
--
Ian.
On Thu, Oct 25, 2012 at 2:26 PM, Willi Haase wrote:
> Hel
Hy Guys,
In previous versions of Lucene there was a class TermPositions that
could be obtained form IndexReader.
Is there something that replaces it in Lucene 4.0.0?
Also is there some documentation that describes how to use Lucene 4.0.0
until next release of Lucene in Action book would be av
A couple of weeks ago Rafał Kuć told you how to store fields, and
Document.get(name) is very straightforward, What's the problem?
http://lucene.472066.n3.nabble.com/Storing-html-files-in-lucene-index-and-get-back-them-td4012877.html
--
Ian.
On Thu, Oct 25, 2012 at 1:08 PM, rajputadesh wrote:
Can you suggest me the method to store the html files and to access back the
html files .
to get back fields from lucene document , i know only the method
get()
how can i retrieve the html file contents back from lucene index and i have
to browse the html file back in java swing form
--
View
Is there anything in Lucene 4.0 that provides 'absolute' scoring so that
i can compare the scoring results of different searches ?
To explain if I do a search for two values fred OR jane and there is a
document that contains both those words exaclty then that document will
score 100, documents
I did some tests and found for our need, ClassicAnalyzer was better (backwards
compatible). Our analyzer uses different tokenizers on certain fields but (used
to) fall back to StandardAnalyzer by default. ClassicAnalyzer will meet our
needs but I see we should move onto a newer implementation su
20 matches
Mail list logo