SearchStax Help Center


Facets: Text vs. String

The SearchStax Site Search solution crawler lets you set up custom index fields to contain content from various HTML elements in your target documents. See Crawler for more information.

The available field types are Boolean, Date, Float, Integer, String, and Text. This has implications for how the data is indexed and queried. For instance, a “String” field requires an exact whole-string match, but a “Text” field is tokenized to index individual words.

For instance, we can set up the Crawler to extract the value of a page’s Product meta field, but do we want “string” or “text?” Crawler lets us try it both ways at once.

After making both fields searchable, we can proceed to the Faceting Tab to set up both fields as facets. After regenerating the Search UI App, we can see that the two resulting facet lists are not the same.

The “string” facet uses the entire content of the field, producing readable labels for the user to select. In contrast, the “text” facet displays single-word tokens that have been subjected to stemming before indexing. Although these facet values are functional, they don’t convey the true meaning of the field value to the user.

Sometimes you need both!

If you want to use a field for both keyword matching and faceting, you’ll need to copy it as two fields, one text and one string. Contact the SearchStax Support Desk.

Questions?

Do not hesitate to contact the SearchStax Support Desk.


Return to Frequently Asked Questions.