[ https://issues.apache.org/jira/browse/LUCENE-5350?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13842194#comment-13842194 ]
Areek Zillur commented on LUCENE-5350: -------------------------------------- The Benchmark results (similar format to LookupBenchmark results) were as follows: {code} -- input stats Input size: 53022, numContexts: 2666, Avg. Input/Context: 20 -- construction time AnalyzingSuggester input: 53022, time[ms]: 10140 [+- 149.13] ContextAwareAnalyzingSuggester input: 53022, time[ms]: 1683 [+- 17.54] -- RAM consumption AnalyzingSuggester size[B]: 4,675,508 ContextAwareAnalyzingSuggester size[B]: 4,837,187 -- prefixes: 6-9, num: 7, onlyMorePopular: false ContextAwareAnalyzingSuggester queries: 53022, time[ms]: 1277 [+- 14.67], ~kQPS: 42 AnalyzingSuggester queries: 53022, time[ms]: 2269 [+- 152.00], ~kQPS: 23 -- prefixes: 2-4, num: 7, onlyMorePopular: false ContextAwareAnalyzingSuggester queries: 53022, time[ms]: 2294 [+- 24.02], ~kQPS: 23 AnalyzingSuggester queries: 53022, time[ms]: 4947 [+- 90.36], ~kQPS: 11 -- prefixes: 100-200, num: 7, onlyMorePopular: false ContextAwareAnalyzingSuggester queries: 53022, time[ms]: 1177 [+- 32.13], ~kQPS: 45 AnalyzingSuggester queries: 53022, time[ms]: 935 [+- 11.53], ~kQPS: 57 {code} >From the results it seems ContextAwaresuggester compared to AnalyzingSuggester: - is 6 times faster for construction - consumes ~3% more RAM - has ~ 2 times the QPS [for prefixes 6-9 & 2-4] - has 20% less QPS [for prefix 100-200] It is to be noted that the dataset only contains terms with one context (hence the benchmark does not take into account terms with multiple contexts). This was an interesting benchmark, thoughts? > Add Context Aware Suggester > --------------------------- > > Key: LUCENE-5350 > URL: https://issues.apache.org/jira/browse/LUCENE-5350 > Project: Lucene - Core > Issue Type: New Feature > Components: core/search > Reporter: Areek Zillur > Fix For: 5.0, 4.7 > > Attachments: LUCENE-5350-benchmark.patch, LUCENE-5350.patch > > > It would be nice to have a Context Aware Suggester (i.e. a suggester that > could return suggestions depending on some specified context(s)). > Use-cases: > - location-based suggestions: > -- returns suggestions which 'match' the context of a particular area > --- suggest restaurants names which are in Palo Alto (context -> > Palo Alto) > - category-based suggestions: > -- returns suggestions for items that are only in certain > categories/genres (contexts) > --- suggest movies that are of the genre sci-fi and adventure > (context -> [sci-fi, adventure]) -- This message was sent by Atlassian JIRA (v6.1#6144) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org