I am trying to build an index for my graph using the following syntax :
schema.vertexLabel("address").index("search").search().by("line_1").asText().by("full_address").asText().add()
Where full_address
is the partitionKey for my address vertex.
While the syntax above completes successfully, it does not seem to be creating a tokenized field for full_address
and I did not see any errors
<schema name="latest_schema.address_p" version="1.5"> <types> <fieldType class="org.apache.solr.schema.TrieIntField" name="TrieIntField"/> <fieldType class="org.apache.solr.schema.UUIDField" name="UUIDField"/> <fieldType class="org.apache.solr.schema.TextField" name="TextField"> <analyzer> <tokenizer class="solr.StandardTokenizerFactory"/> <filter class="solr.LowerCaseFilterFactory"/> </analyzer> </fieldType> <fieldType class="org.apache.solr.schema.StrField" name="StrField"/> </types> <fields> <field docValues="true" indexed="true" multiValued="true" name="~~property_key_id" type="TrieIntField"/> <field docValues="true" indexed="true" multiValued="true" name="~~property_id" type="UUIDField"/> <field indexed="true" multiValued="false" name="line_1" type="TextField"/> <field docValues="true" indexed="true" multiValued="false" name="full_address" type="StrField"/> </fields> <uniqueKey>(full_address)</uniqueKey> </schema>
As full_address is being indexed as a StrField(non tokenized) instead of the expected TextField(tokenized)
I also tried omitting the type, but it did not make any difference :
schema.vertexLabel("address").index("search").search().by("full_address").by("line_1").asText().add()
Could you please clarify why this is the case? Looking at the documentation[1] , I did not see any information that states that this is not possible so I am not sure why this is happening.
[1] https://docs.datastax.com/en/dse/6.0/dse-dev/datastax_enterprise/graph/using/useSearchIndexes.html