Uploaded image for project: 'Hibernate Search'
  1. HSEARCH-3507

Improve consistency of naming for methods related to native Elasticsearch/Lucene features (fromJsonString, etc.)



      1. We use asJsonString to define a native Elasticsearch field that will use JSON for its field definition, and will expect JSON as a java.lang.String when indexing. It's a bit confusing as one could expect the string to actually be interpreted as a string, not parsed as JSON. Maybe we should rename to asNative?
      2. Maybe we should also expose asNativeBoolean, asNativeString, etc. to define native Elasticsearch fields that will use JSON for their definition, but expect a Java type when indexing and will encode it appropriately?
      3. To be consistent, maybe we should also rename fromJsonString in the predicate factory contexts to fromNative?
      4. To be consistent, maybe we should do the same for Lucene? asNativeField for field definition, fromNative for predicates?
      5. Also, we use fromJsonString/fromLuceneSort in the sort factory contexts. In Search 5 we used to name these methods byNative, which is more consistent with the other byXXX methods. Maybe we should do the same in Search 6?




            • Assignee:
              yrodiere Yoann Rodière
              yrodiere Yoann Rodière
            • Votes:
              0 Vote for this issue
              1 Start watching this issue


              • Created: