FAQ
Hi,

I read the chapter about custom sort methods and hacked around with
the GeoSort. Are there ways to improve the algorithm? Espacially
calculating the distance for ALL documents in the index is a bad idea
because only the distance for hitted documents are of interest. That
could save lots of time because the number of hits compared to all
documents in an index usually is pretty small.


Thanks,
Sascha

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org

Search Discussions

  • Karl Wettin at Jul 15, 2008 at 8:06 am

    15 jul 2008 kl. 09.50 skrev Sascha Fahl:

    I read the chapter about custom sort methods and hacked around with
    the GeoSort. Are there ways to improve the algorithm? Espacially
    calculating the distance for ALL documents in the index is a bad
    idea because only the distance for hitted documents are of interest.
    That could save lots of time because the number of hits compared to
    all documents in an index usually is pretty small.
    GeoLucene and LocalLucene are both branches of Lucene hacked to handle
    geo-positioning problems. You might want to take a look at them if
    that is features you are looking for. I suppose the code in the book
    is mearly an example to show how to implement a custom sort, but I
    didn't read it so I'm just guessing here.


    karl

    ---------------------------------------------------------------------
    To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
    For additional commands, e-mail: java-user-help@lucene.apache.org
  • Sascha Fahl at Jul 15, 2008 at 8:22 am
    There is a big difference between GeoSearch and GeoSort. GeoSearch
    means you are looking for data within a certain range. To implement
    this index structures like R-Trees help, because they make it a lot
    easier to think in "boxes". GeoSort is just to sort the data in
    relation to a given point in a 2D environment. So you always have to
    compute the distance from the given point to the locations of the
    documents. I think this is the only possibly approach?


    Am 15.07.2008 um 10:05 schrieb Karl Wettin:
    15 jul 2008 kl. 09.50 skrev Sascha Fahl:
    I read the chapter about custom sort methods and hacked around with
    the GeoSort. Are there ways to improve the algorithm? Espacially
    calculating the distance for ALL documents in the index is a bad
    idea because only the distance for hitted documents are of
    interest. That could save lots of time because the number of hits
    compared to all documents in an index usually is pretty small.
    GeoLucene and LocalLucene are both branches of Lucene hacked to
    handle geo-positioning problems. You might want to take a look at
    them if that is features you are looking for. I suppose the code in
    the book is mearly an example to show how to implement a custom
    sort, but I didn't read it so I'm just guessing here.


    karl

    ---------------------------------------------------------------------
    To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
    For additional commands, e-mail: java-user-help@lucene.apache.org
    Sascha Fahl
    Softwareenticklung

    evenity GmbH
    Zu den Mühlen 19
    D-35390 Gießen

    Mail: sascha@evenity.net






    ---------------------------------------------------------------------
    To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
    For additional commands, e-mail: java-user-help@lucene.apache.org
  • Karl Wettin at Jul 15, 2008 at 9:39 am

    15 jul 2008 kl. 10.20 skrev Sascha Fahl:

    There is a big difference between GeoSearch and GeoSort. GeoSearch
    means you are looking for data within a certain range. To implement
    this index structures like R-Trees help, because they make it a lot
    easier to think in "boxes". GeoSort is just to sort the data in
    relation to a given point in a 2D environment. So you always have to
    compute the distance from the given point to the locations of the
    documents. I think this is the only possibly approach?
    What I really tried to say is that if you are looking at improving a
    lat/long related solution you'll probably find more expertize on the
    user lists of the projects I mentioned.

    They too sort their results by distance. My guess is that they make
    use of the "boxes" there too. If, then I don't know if you can use
    their API as any other Lucene index. If not, well then you've probably
    got a really nice GeoSort to plug in to your application right here
    and now.

    LocalLucene/trunk/README:
    //Create a distance sort using the radial filter (distance
    calculations are done
    // in the radial filter, so use the output of that to drive the sort)
    DistanceSortSource dsort = new DistanceSortSource(filter);
    Sort sort = new Sort(new SortField("foo", dsort));


    karl






    Am 15.07.2008 um 10:05 schrieb Karl Wettin:
    15 jul 2008 kl. 09.50 skrev Sascha Fahl:
    I read the chapter about custom sort methods and hacked around
    with the GeoSort. Are there ways to improve the algorithm?
    Espacially calculating the distance for ALL documents in the index
    is a bad idea because only the distance for hitted documents are
    of interest. That could save lots of time because the number of
    hits compared to all documents in an index usually is pretty small.
    GeoLucene and LocalLucene are both branches of Lucene hacked to
    handle geo-positioning problems. You might want to take a look at
    them if that is features you are looking for. I suppose the code in
    the book is mearly an example to show how to implement a custom
    sort, but I didn't read it so I'm just guessing here.


    karl

    ---------------------------------------------------------------------
    To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
    For additional commands, e-mail: java-user-help@lucene.apache.org
    Sascha Fahl
    Softwareenticklung

    evenity GmbH
    Zu den Mühlen 19
    D-35390 Gießen

    Mail: sascha@evenity.net






    ---------------------------------------------------------------------
    To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
    For additional commands, e-mail: java-user-help@lucene.apache.org

    ---------------------------------------------------------------------
    To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
    For additional commands, e-mail: java-user-help@lucene.apache.org

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupjava-user @
categorieslucene
postedJul 15, '08 at 7:51a
activeJul 15, '08 at 9:39a
posts4
users3
websitelucene.apache.org

People

Translate

site design / logo © 2022 Grokbase