Litium uses Lucene as the underlying search engine. This article explains the general concepts and things to watch out for. Detailed code examples are given in articles under each module.

Litium uses Lucene as the underlying search engine. Developers are not required to know about lucene when implementing functionality based on search, but some key observations should be kept in mind.

  1. When some change is made in a entity, it will take a short amount of time for the search engine to index the changes. Therefore, if you search immediately after the change, it might not result in a successful hit.
  2. Searching has more performance when compared to iterating through a large collection to find an item. For example, if you would like to find all articles with article numbers starting from "001" to be found, its much faster to search.
  3. When building search, be mindful of the Lucene search text syntax. For example, '*' at the end of a string means a pattern match, with any number of ending characters.
  4. When searching language is important, because some property values might be language dependent. However, if you are searching for a language independant field, you may use the default language.
  5. After upgrading or migrating to a new files folder, it is a must that search indexes are rebuilt. This can be done from Litium back office Settings > System Settings > Search Indexes
Is this page helpful?
Thank you for your feedback!