It seems to me that the easiest thing would be to fire two queries and
then just concatenate the results
category:A AND body:fred
category:B AND body:fred
If you really, really didn't want to fire two queries, you could create
filters on category A and category B and make a couple of
passes thr
I'm interested in comments on the following problem.
I have a set of documents. They fall into 3 categories. Call these
categories A, B, and C. Each document has an indexed, non-tokenized
field called "category" which contains A, B, or C (they are mutually
exclusive categories).
All
Hi Peter,
On 11/06/2008 at 4:25 PM, Peter Keegan wrote:
> I've discovered another flaw in using this technique:
>
> (+contents:petroleum +contents:engineer +contents:refinery)
> (+boost:petroleum +boost:engineer +boost:refinery)
>
> It's possible that the first clause will produce a matching
> d
I've discovered another flaw in using this technique:
(+contents:petroleum +contents:engineer +contents:refinery)
(+boost:petroleum +boost:engineer +boost:refinery)
It's possible that the first clause will produce a matching doc and none of
the terms in the second clause are used to score that do
Thanks! :-)
2008/11/6 Michael McCandless <[EMAIL PROTECTED]>:
>
> The field never changes across all docs? If so, this will work fine.
>
> Mike
>
> Glen Newton wrote:
>
>> I have a use case where I want all of my documents to have - in
>> addition to their other fields - a single field=value.
>
Section 5.1.2 of LIA also explains this.
Sort.RELEVANCE sorts by relevance score, descending, breaking ties by
sorting by doc ID, ascending, and s the default if you don't specify a
sort order.
Sort.INDEXORDER sorts only by doc ID, which is not the default sort.
Mike
Teruhiko Kurosaka wr
The field never changes across all docs? If so, this will work fine.
Mike
Glen Newton wrote:
I have a use case where I want all of my documents to have - in
addition to their other fields - a single field=value.
An example use is where I have multiple Lucene indexes that I search
in paralle
Let me give some background on the problem behind my question.
Our index contains many fields (title, body, date, city, etc). Most queries
search all fields, but for best performance, we create an additional
'contents' field that contains all terms from all fields so that only one
field needs to b
I have a use case where I want all of my documents to have - in
addition to their other fields - a single field=value.
An example use is where I have multiple Lucene indexes that I search
in parallel, but still need to distinguish them.
Index 1: All documents have: source="a1"
Index 2: All documen
I can specify Sort.RELEVANCE to Searcher.search as in:
hits = searcher.search(q, Sort.RELEVANCE); // Using deprecated method to
make it short
What is the real effect of specifying the Sort argument like this?
Does Sort.RELEVANCE sorts the hits in order of the score
shown in Sect. 3.3 "Understand
Not sure, but it sounds like you are interested in a higher level
Query, kind of like the BooleanQuery, but then part of it sounds like
it is per document, right? Is it that you want to deal with multiple
payloads in a document, or multiple BTQs in a bigger query?
On Nov 4, 2008, at 9:42 AM
On Thursday 06 November 2008 10:18:45 Dora wrote:
> Lucene will then tell me which contacts match my query, but is there
> a way to know which field(s) matched the request ?
> The goal is to display the XML with the matching fields highlighted.
I think org.apache.lucene.search.highlight.Highlight
Hello Anshum,
No, I hadn't seen that. I had only gone through Similarity, and Weight
classes and worked through their calculations.
Thank you very much for the clarification!
Kind regards,
Francisco
On Thu, Nov 6, 2008 at 11:59 AM, Anshum <[EMAIL PROTECTED]> wrote:
> Hi Fransisco,
>
> Did you
Hi Fransisco,
Did you come across :
scoreNorm = 1.0f / topDocs.getMaxScore();
or something of this sort in Hits?
As per my knowledge, the initial score is more than 1 but finally the scores
get divided by the maxScore of the matched doc set. i.e. Setting an upper
limit of 1 (for the max scor
Hi Daan,
Can we have an exemple of your implementation?
Thx
Ulrich VACHON
-Message d'origine-
De : Daan de Wit [mailto:[EMAIL PROTECTED]
Envoyé : jeudi 6 novembre 2008 11:35
À : java-user@lucene.apache.org
Objet : RE: Can Lucene tells which field matched ?
Hi,
I have implemented such
Hello,
I have been going through the scoring documentation and code.
I had the expectation that Lucene would enforce a score value between [0,1].
But from what I can grasp from the code and docs, score values can be
greater than one.
Does Lucene considers score values greater than 1 as valid?
K
Hi,
I have implemented such a solution using the query explanation.
IndexSearcher has an explain(Query query, int document) method that
returns an Explanation object, on the Explanation object you can ask if
it is a match with #isMatch(). You still need to repeat this for each
found document thoug
Hi
I am new to Lucene and working on a search module for some XML data:
I need to provide a "search all" able to look in all xml fields.
Apparently Lucene (2.4.0) does not provide such a "search all" facility, and
I have to build a query with my search field associated to all available XML
elem
18 matches
Mail list logo