[ https://issues.apache.org/jira/browse/LUCENE-8368?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16521755#comment-16521755 ]
Robert Muir commented on LUCENE-8368: ------------------------------------- On the OSM benchmark it can facet-by-london-borough at ~ 20M hits/sec on my machine, better than I thought it would do. There is some smelly stuff to figure out first though: * the LongValues abstraction used here doesn't support SortedNumeric, that's a problem for LatLonDV. It seems to also be an issue for the numeric range facet classes here. * the re-use of range stuff makes for less code, but we really shouldn't be doing binary search, since our ranges are 100% dense. * maybe not so great in the API to force construction of a polygon2D in every query? But when i benchmarked with the boroughs polygons (33 polygons, 186,318 total vertices), this didn't seem to matter either. > facet by polygon > ---------------- > > Key: LUCENE-8368 > URL: https://issues.apache.org/jira/browse/LUCENE-8368 > Project: Lucene - Core > Issue Type: New Feature > Components: modules/facet > Reporter: Robert Muir > Priority: Major > Attachments: LUCENE-8368.patch > > > This can give some nice flexibility if you are working with search results on > a map. Of course if everything about your use-case is static, its better to > compute this up-front and index string values, but its not always the case. > Also it can be helpful if your polygons are changing often, since you don't > have to reindex. > Polygon2D already supports multipolygons, but today it only returns a boolean > value. This patch adds a {{find}} method that returns the polygon that > actually matched, or -1 if it doesn't match. {{contains}} is then just > written as {{find >= 0}}. > Then we can solve the problem with just some sugar over the existing range > faceting, as each multipolygon is just a range of ids coming back from > {{find}} that correspond with it. e.g. if you were faceting by country, you > might have ~200 countries with 100,000 total polygons, and polygons > 22,000-32,000 correspond to Canada or whatever. -- This message was sent by Atlassian JIRA (v7.6.3#76005) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org