Your search is in good hands

  • Pricing
  • Documentation
    • User guides
    • Support
    • Features
      • Roadmap
      • Artificial Intelligence
      • Elasticsearch
      • OpenSearch
      • Solr
      • Algolia
      • Weaviate
      • Hosting
      • Addons (Plugins, themes, features)
      • Releases
    • Blog
  • Demo
    • All Demos
    • Testimonials
  • My Licenses
    • Login
    • Why us
    • Contact us
Menu
  • Pricing
  • Documentation
    • User guides
    • Support
    • Features
      • Roadmap
      • Artificial Intelligence
      • Elasticsearch
      • OpenSearch
      • Solr
      • Algolia
      • Weaviate
      • Hosting
      • Addons (Plugins, themes, features)
      • Releases
    • Blog
  • Demo
    • All Demos
    • Testimonials
  • My Licenses
    • Login
    • Why us
    • Contact us

Home » Actions and Filters (Hooks) » Index – Sanitize value

Index - Sanitize value

336 views 0 October 14, 2016 Updated on July 13, 2019

Name


WPSOLR_Events::WPSOLR_FILTER_INDEX_SANITIZE_FIELD


Short description

Sanitize a field value.


Long description

Control that a field value matches it’s expected Solr type definition. Often, your custom fields contain some historical irrelevant values, like a string when a number is expected, which can lead to Solr errors while indexing. With this filter, you can stop the indexing, or simply ignore the field value.

Cinematic of WordPress filter to sanitize a custom field before it is sent to Solr for indexing
Cinematic of WordPress filter to sanitize a custom field before it is sent to Solr for indexing



Examples

Search in the plugin's code (we eat our own dog food).

Was this helpful?

Yes  No
Related Articles
  • Video – WPSOLR PRO + ACF PRO + Choice Types + TwentySixteen + Elasticsearch
  • Search results – Replace facets HTML
  • Search results – Replace the default WP search by WPSOLR search
  • Search query – Query
  • index – embedded files
  • Search results – Javascript parameters
Expand All Collapse All
  • Actions and Filters (Hooks)
    • Index - Custom fields
    • Index - Document
    • Search results - Replace facets HTML
    • Index - SQL statement
    • Search results - Posts
    • Search results - Custom html
    • Search query - Fields list
    • Options - Custom fields
    • Options - Solr dynamic field types
    • Options - Default sort list
    • Search results - Sort fields
    • Search results - Replace the default WP search by WPSOLR search
    • Search results - Default sort
    • Search results - Javascript parameters
    • index - embedded files
    • Search query - Query
    • Index - Sanitize value
Login
Support
Privacy policy
  • Terms and Conditions
  • © 2020 wpsolr.com. All Rights Reserved.
Youtube
Roadmap