You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by gs...@apache.org on 2022/06/22 19:10:03 UTC
[lucene] branch main updated: Index only the docs for FacetField posting list (#922)
This is an automated email from the ASF dual-hosted git repository.
gsmiller pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/lucene.git
The following commit(s) were added to refs/heads/main by this push:
new bc72a53efc0 Index only the docs for FacetField posting list (#922)
bc72a53efc0 is described below
commit bc72a53efc0ced98ecfecd0bd52635d8b258c79f
Author: Gautam Worah <wo...@gmail.com>
AuthorDate: Wed Jun 22 12:09:56 2022 -0700
Index only the docs for FacetField posting list (#922)
---
lucene/CHANGES.txt | 2 ++
.../facet/src/java/org/apache/lucene/facet/FacetField.java | 12 +++++-------
2 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/lucene/CHANGES.txt b/lucene/CHANGES.txt
index 02122d3cd0f..66d0924a870 100644
--- a/lucene/CHANGES.txt
+++ b/lucene/CHANGES.txt
@@ -130,6 +130,8 @@ Other
* LUCENE-10604: Improve ability to test and debug triangulation algorithm in Tessellator.
(Craig Taverner)
+* GITHUB#922: Remove unused and confusing FacetField indexing options (Gautam Worah)
+
======================= Lucene 9.2.0 =======================
API Changes
diff --git a/lucene/facet/src/java/org/apache/lucene/facet/FacetField.java b/lucene/facet/src/java/org/apache/lucene/facet/FacetField.java
index 6b675819185..a0fc42599c6 100644
--- a/lucene/facet/src/java/org/apache/lucene/facet/FacetField.java
+++ b/lucene/facet/src/java/org/apache/lucene/facet/FacetField.java
@@ -20,7 +20,7 @@ import java.util.Arrays;
import org.apache.lucene.document.Document;
import org.apache.lucene.document.Field;
import org.apache.lucene.document.FieldType;
-import org.apache.lucene.index.IndexOptions;
+import org.apache.lucene.facet.taxonomy.TaxonomyWriter;
/**
* Add an instance of this to your {@link Document} for every facet label.
@@ -30,14 +30,12 @@ import org.apache.lucene.index.IndexOptions;
*/
public class FacetField extends Field {
- /** Field type used for storing facet values: docs, freqs, and positions. */
+ /**
+ * Field type used for storing facet values. Actual field type used for indexing is determined in
+ * {@link FacetsConfig#build(TaxonomyWriter, Document)}
+ */
public static final FieldType TYPE = new FieldType();
- static {
- TYPE.setIndexOptions(IndexOptions.DOCS_AND_FREQS_AND_POSITIONS);
- TYPE.freeze();
- }
-
/** Dimension for this field. */
public final String dim;