The configuration directives MetaNames and PropertyNames are used to define fields in Dezi. The names PropertyNames and MetaNames originate with Swish-e (see the Swish-e FAQ for a description.)
Here are some notes on the differences between those two directives and how they are implemented for Dezi with Apache Lucy. The relevant Perl classes are Dezi::Lucy::Indexer (or SWISH::Prog::Lucy::Indexer, depending on your version of Dezi).
- A field defined as either a MetaName, PropertyName or both, can be searched.
- Fields are matched against tag names in your XML/HTML documents. See also the TagAlias, UndefinedMetaTags, UndefinedXMLAttributes,
and XMLClassAttributes directives. - You can alias field names with MetaNamesAlias and PropertyNamesAlias.
- MetaNames are tokenized and case-insensitive and (optionally, with FuzzyIndexingMode) stemmed.
- PropertyNames are stored, case-sensitive strings.
- If a field is defined as both a MetaName and PropertyName, then it will be tokenized.
- If a field is defined only as a MetaName, it will be parsed but not stored. That means you can search on the field but when you try and retrieve the field’s value from the results, it will cause a fatal error.
- If a field is defined only as a PropertyName, it will be parsed and stored, but it will not be tokenized. That means the field’s contents are stored without being split up into words.
- You can control the parsing and storage of PropertyName-only fields with the following additional directives:
- PropertyNamesCompareCase – case sensitive search
- PropertyNamesIgnoreCase – case insensitive search (default)
- PropertyNamesNoStripChars – preserve whitespace
- There are two default MetaNames defined: swishdefault and swishtitle.
- There are two default PropertyNames defined: swishtitle and swishdescription.
- The libswish3 XML and HTML parsers will automatically treat a <title> tag as swishtitle. Likewise they will treat <body> tag as swishdescription.
- Things get complicated quickly when defining fields. Experiment with small test cases to arrive at the configuration that works best with your application.