Hi Lokesh
IIUC each document (like for example a shop description) has a longitude
and a latitude associated with.
The user search input are some keywords and the the user's geo location.
The keywords you use to search for the documents and the users's geo
location you would like to use for
Hi Team,
I am little bit familiar with Lucene, and I have a problem statement in
hand to score each document based on the value of the field.
Value will be of type
GeoPoint {
Lat
Long
}
And in the qry I will be getting other pair of lat, long and distance from
that lat long.
I have figured out
> -Original Message-
> From: Dominik Safaric [mailto:dominiksafa...@gmail.com]
> Sent: Thursday, October 12, 2017 8:53 AM
> To: java-user@lucene.apache.org
> Subject: Re: Lucene 7.x custom Scorer on point values
>
> The number of values per document per field is equal
.thetaphi.de
> eMail: u...@thetaphi.de
>
> > -Original Message-
> > From: Dominik Safaric [mailto:dominiksafa...@gmail.com]
> > Sent: Wednesday, October 11, 2017 1:39 PM
> > To: java-user@lucene.apache.org
> > Subject: Re: Lucene 7.x custom Scorer on po
hi.de
> -Original Message-
> From: Dominik Safaric [mailto:dominiksafa...@gmail.com]
> Sent: Wednesday, October 11, 2017 1:39 PM
> To: java-user@lucene.apache.org
> Subject: Re: Lucene 7.x custom Scorer on point values
>
> Thanks Uwe for the clarification.
>
> The value
Thanks Uwe for the clarification.
The values are already indexed as numeric docvalues, i.e. numeric
point-docvalues. In both cases, either by implementing a custom scorer or
function query I would need to access the point values for the matched/hit
documents. How can I derive these values given a
e function queries package. Or
much better: I'd use the lucene expressions module to do this. It allows you to
express the scoring formula as a javascript formula and use all docvalues
fields in your document to calculate the final score.
In both cases there is no need to create a custom scorer
Recently I've implemented a custom Query that in turn scores documents
using a custom Scorer implementation using a long primitive point values.
The associated field is multi valued and has doc values enabled. For
retrieving these multi valued longs I've used LeafReader.document()
g the
> custom score I'm retrieving the values of the field using
> LeafReader.document(docId()) which is a costly process. What alternatives
> are there for reading plongs using a LeafReader and DocIdSetIterator within
> a custom Scorer implementation?
>
> Thanks in adva
atives
are there for reading plongs using a LeafReader and DocIdSetIterator within
a custom Scorer implementation?
Thanks in advance.
Dominik
document. Indexes are updated at regular intervals in one jvm. A
> > searcher jvm opens the index and reads all the fixed-length records into
> > RAM. Given an index-wide docId, the custom scorer can quickly access the
> > corresponding fixed-length external data.
> >
> >
AM. Given an index-wide docId, the custom scorer can quickly access the
> corresponding fixed-length external data.
>
> Could you explain a bit more about how mapping the external data to be per
> segment would work? As I said, rebuilding the whole file isn't a big deal
> and the sing
ated for each segment (lights
> on!).
> So, couldn't I just do the subreader->docBase map lookup once when the
> custom scorer is created? No need to access the map for every doc this way.
Right, that should work.
Mike
-
ader->docBase map lookup once when the
custom scorer is created? No need to access the map for every doc this way.
Peter
On Tue, Nov 17, 2009 at 8:58 AM, Peter Keegan wrote:
> The external data is just an array of fixed-length records, one for each
> Lucene document. Indexes are updated a
The external data is just an array of fixed-length records, one for each
Lucene document. Indexes are updated at regular intervals in one jvm. A
searcher jvm opens the index and reads all the fixed-length records into
RAM. Given an index-wide docId, the custom scorer can quickly access the
...).
>>For your custom sort comparator, are you using FieldComparator?
>
> I'm using the deprecated FieldSortedHitQueue. I started looking into
> replacing it with FieldComparator, but it was much more involved than I had
> expected, so I postponed. Also, this would only b
I postponed. Also, this would only be a partial solution to a
query with a custom scorer and custom sorter.
>Failing these, Lucene currently visits the readers in index order.
>So, you could accumulate the docBase by adding up the reader.maxDoc()
>for each reader you've seen. However,
Can you remap your external data to be per segment? Presumably hat
would make reopens faster for your app.
For your custom sort comparator, are you using FieldComparator? If
so, Lucene calls setNextReader to tell you the reader & docBase.
Failing these, Lucene currently visits the readers in in
The same thing is occurring in my custom sort comparator. The ScoreDocs
passed to the 'compare' method have docIds that seem to be relative to the
segment. Is there any way to translate these into index-wide docIds?
Peter
On Mon, Nov 16, 2009 at 2:06 PM, Peter Keegan wrote:
> I forgot to mention
I forgot to mention that this is with V2.9.1
On Mon, Nov 16, 2009 at 1:39 PM, Peter Keegan wrote:
> I have a custom query object whose scorer uses the 'AllTermDocs' to get all
> non-deleted documents. AllTermDocs returns the docId relative to the
> segment, but I need the absolute (index-wide) do
I have a custom query object whose scorer uses the 'AllTermDocs' to get all
non-deleted documents. AllTermDocs returns the docId relative to the
segment, but I need the absolute (index-wide) docId to access external data.
What's the best way to get the unique, non-deleted docId?
Thanks,
Peter
Chris Salem
>
>
> - Original Message -
> To: java-user@lucene.apache.org
> From: Grant Ingersoll
> Sent: 8/19/2009 7:17:45 PM
> Subject: Re: custom scorer
>
>
> Are you setting the Similarity before indexing, too, on the IndexWriter?
>
> On Aug 19, 2009, at 4:20 PM, Chris
No, I take it I have to use it for both? Is there anything else I should have
to do?
Sincerely,
Chris Salem
- Original Message -
To: java-user@lucene.apache.org
From: Grant Ingersoll
Sent: 8/19/2009 7:17:45 PM
Subject: Re: custom scorer
Are you setting the Similarity before
Are you setting the Similarity before indexing, too, on the IndexWriter?
On Aug 19, 2009, at 4:20 PM, Chris Salem wrote:
Hello,
I'm trying to write a custom scorer that only uses the term
frequency function from the DefaultSimilarity class, the problem is
that documents with
Hello,
I'm trying to write a custom scorer that only uses the term frequency function
from the DefaultSimilarity class, the problem is that documents with lower
frequencies are returning with higher scores than documents with higher
frequencies. Here's the code:
searcher.setSimi
25 matches
Mail list logo