Allow Numeric Faceting from FieldBridge

Description

I'm trying to create numeric facet index from bridge. I found DoubleDocValuesField from hibernate-search's source code But can't use it in query. I also tried SortedSetDocValuesFacetField it working but it's string. String doesn't support range faceting. I need range facetable dynamic property something like this.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 public class AttrFieldBridge implements FieldBridge { public void set(String name, Object value, Document document, LuceneOptions luceneOptions) { if (value != null) { @SuppressWarnings("unchecked") List<Attribute> attrs = (List<Attribute>) value; for (Attribute attr : attrs){ String fieldName = name+"_"+attr.getAttributeId(); double fieldValue = attr.getVal(); document.add(new DoubleDocValuesField(fieldName, fieldValue)); document.add(new DoubleField(fieldName, fieldValue, Field.Store.NO)); } } }

I created stackoverflow question.
http://stackoverflow.com/questions/40380449/how-to-index-numeric-value-for-range-facet/40398415

Environment

None

Status

Assignee

Yoann Rodière

Reporter

HM

Labels

None

Suitable for new contributors

None

Feedback Requested

None

Components

Fix versions

Affects versions

5.5.5.Final

Priority

Minor
Configure