lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From 小鱼儿 <>
Subject Need suggestions on implementing a custom query (offload R-tree filter to fully in-memory) on Lucene-8.3
Date Wed, 04 Dec 2019 04:31:11 GMT
Background: i need to implement a document indexing and search for
POIs(point of interest) under LBS scene. A POI has name, address, and
location(LatLonPoint), and i want to combine a text query with a
geo-spatial 2d range filter.

The problem is, when i first build a native in-memory index which use a
simple BitSet as DocIDSet type and STRTree class from the famous JTS lib, i
get 20ms/1000qps perf metrics with 1w8 POIs on my laptop(Windows 7 x64, use
mmap codec). But when i use Lucene-8.3 to implement the same
functionality(which use LatLonPoint.newDistanceQuery which seems use the
default BKD tree index), i only get 150ms/130qps which is a very bad

So my idea is, can i do a custom filter query, which builds a fully
in-memory R-tree index to boost the spatial2d range filter performance? I
need to access Lucene's internal DocIDSet class so i can do a fast merge
with no scoring needed. Hope this will improve the query performance.

Any suggestions?

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message