-
-
Notifications
You must be signed in to change notification settings - Fork 123
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Taxonomy Index for Facets #323
Taxonomy Index for Facets #323
Conversation
…v3/feature/facets-searchafter
@nzdev same as #321 (comment) |
Done |
whoa! This is some huge work! I love the effort put in here. My only concern is how I am going to support this moving forward :P But alas, it's a community effort so if folks need help, I guess we all need to chip in. One question though - Can you explain in more detail why the extra index is required and why the info can't be stored in the same index? |
Happy to help. TLDR: Some of the faceting features require the use of the taxonomy index, plus it makes faceting faster. |
Merging this huge amount of work! Will need to give all this a run through myself since I haven't had time yet. Regarding the #321, looks like that is auto merged with this one being merged. So what do @nzdev and @nikcio think are the next steps? Are there remaining PRs we want to get in for a v4 release? And then I think we'll need to see what compatibility is like for Umbraco - as in, will they need to rev a major change or do we think we can ship this while supporting Umbraco v12 without changes? |
@Shazwazza See #310 (comment) 😄 |
@nzdev Does this pull request also support filtering using hierarchical facets or does it just support the index aspect at the moment? I had a play around with the demo project but couldn't see how to filter using hierarchical facets. Awesome work by the way 🎉 |
Mostly the index aspect, building on top of the work from @nikcio . You may need to use lucene.net directly. Drill down / sideways abstractions are still being worked on. |
Builds on #310 and #311 and #321.
Adds support for the Taxonomy index for fast / Hierarchical facets to LuceneIndex.
What is the Taxonomy Index?
The Taxonomy Index is a sidecar index used for efficient faceting. The Taxonomy Index is required in order to use hierarchical facets. The Taxonomy Index has it's own directory and writer / reader for Taxonomy specific operations. The "main" Index is still used.
What's in this PR?
LuceneIndex
.LuceneIndexOptions.UseTaxonomyIndex
to enable/disable the use of the Taxonomy Index.FieldDefinitionTypes.FacetTaxonomyFullText
ILuceneTaxonomySearcher
for Lucene Taxonomy specific search functionality onLuceneIndex
.CreateTaxonomyDirectory
toIDirectoryFactory
to change how / where the Taxonomy Directory is created.SyncedTaxonomyFileSystemDirectoryFactory
andExamineTaxonomyReplicator
to replicate the Index and Taxonomy.LuceneFacetSamplingQueryOptions
onLuceneQueryOptions
IFacetQueryField
Why?
Support faster facet counting and hierarchical facet paths.
How to use the Taxonomy Index?
How to switch to using Taxonomy Index from using a Faceted, non-taxonomy index.
LuceneIndexOptions.UseTaxonomyIndex = true;
for the index.LuceneIndexOptions.FacetsConfig
. To enable hierarchical facets on a field, callFacetsConfig.SetHierarchical("facetfieldname", true);
FieldDefinitionTypes.FacetFullText
=>FieldDefinitionTypes.FacetTaxonomyFullText