You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@groovy.apache.org by pa...@apache.org on 2024/11/27 01:42:11 UTC

(groovy-website) branch asf-site updated: a little more facet detail

This is an automated email from the ASF dual-hosted git repository.

paulk pushed a commit to branch asf-site
in repository https://gitbox.apache.org/repos/asf/groovy-website.git


The following commit(s) were added to refs/heads/asf-site by this push:
     new c549782  a little more facet detail
c549782 is described below

commit c54978264b70c6067ce787e9e775d82cfa95c9c3
Author: Paul King <pa...@asert.com.au>
AuthorDate: Wed Nov 27 11:41:58 2024 +1000

    a little more facet detail
---
 site/src/site/blog/groovy-lucene.adoc | 32 +++++++++++++++++++++++++++-----
 1 file changed, 27 insertions(+), 5 deletions(-)

diff --git a/site/src/site/blog/groovy-lucene.adoc b/site/src/site/blog/groovy-lucene.adoc
index 354a929..f8c0bbd 100644
--- a/site/src/site/blog/groovy-lucene.adoc
+++ b/site/src/site/blog/groovy-lucene.adoc
@@ -520,11 +520,6 @@ Facets allow for more powerful searching. They are often used for grouping
 search results into categories. The search user can drill down into
 categories to refine their search.
 
-Let's use facets to store project names for each document.
-One facet capturing the project name information might be all we need,
-but to illustrate some Lucene features, we'll use three facets and
-store slightly different information in each one.
-
 NOTE: Facets are a really powerful feature. Given that we are indexing asciidoc source
 files, we could even use libraries like https://github.com/asciidoctor/asciidoctorj[AsciidoctorJ]
 to extract more metadata from our source files and store them as facets.
@@ -533,6 +528,33 @@ This would allow us to make some pretty powerful searches.
 We leave this as an exercise for the reader.
 But if you try, please let us know how you go!
 
+Let's use facets to store project names for each document.
+One facet capturing the project name information might be all we need,
+but to illustrate some Lucene features, we'll use three facets and
+store slightly different information in each one:
+
+
+|===
+|Facet |Type |Description/Example
+
+|`projectHitCounts`
+|`IntAssociationFacetField`
+|Project reference hit counts, e.g.
+"Apache Lucene" has 2 hits in `groovy-lucene.adoc`
+
+|`projectFileCounts`
+|`FacetField`
+|Documents which reference a project, e.g.
+"Apache Spark" is referenced by
+`classifying-iris-flowers-with-deep.adoc`
+
+|`projectNameCounts`
+|`FacetField`
+|As above but hierarchical, e.g.
+["Apache", "Commons", "Math"] is reference by
+`fruity-eclipse-collections.adoc`
+|===
+
 We'll use our regex to find project names and store the information in our facets.
 Lucene creates a special _taxonomy_ index for indexing facet information.
 We'll also enable that.