Swish-e documentation

The original swish-e.org site is no more, but the source code is available on GitHub. As a courtesy, the documentation is available to browse here on dezi.org.

MetaNames and PropertyNames

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 […]

Reserved fields

Dezi is built on top of SWISH::3 and SWISH::Prog, which reserve several built-in field names. Here’s a list of the reserved, built-in field names: swishdefault swishdescription swishdocpath swishdocsize swishencoding swishlastmodified swishmime swishparser swishtitle swishwordnum The following method names are reserved in SWISH::Prog::Result which are mapped to the built-in field names: built-in method swishdocpath uri swishlastmodified […]

The –elastic feature

New in Dezi 0.2.10 is the –elastic feature. This option is shorthand for: engine_config => { indexer_config => { config => { UndefinedMetaTags => ‘autoall’, } } } But instead of all that, just pass the –elastic option when you start the server: % dezi –elastic The –elastic feature makes your Dezi server act like […]

Tiny response format

Just uploaded to CPAN are Search::OpenSearch 0.21 and Search::OpenSearch::Server 0.20. These releases add the Tiny JSON response format and the ability to limit your responses to a subset of the available fields. Now all you minimalists can strip down your Dezi responses to bare bones JSON. Example: curl ‘http://localhost:5000/search?q=foo&t=Tiny&x=’ will return the only the built-in […]

Adding JSON encoded documents

Using the example from the Elastic Search Tutorial: $ curl -XPOST ‘http://localhost:5000/index/blog/post/1′ -d ‘ { “user”: “dilbert”, “postDate”: “2011-12-15″, “body”: “Search is hard. Search should be easy.” , “title”: “On search” }’ -H ‘Content-Type: application/json’ Just add the -H option to explicitly pass the content type as an HTTP header.