[KinoSearch] error when query parser has no fields specified

Marvin Humphrey marvin at rectangular.com
Fri Jun 27 14:51:04 PDT 2008


On Jun 26, 2008, at 12:30 PM, Mike Barborak wrote:

> is their a public API to get the list of fields in an index?

There is not an official public API for retrieving field names in  
0.1x, but I suggest you just hack it for now and use this undocumented  
method:

    my $fields = $searcher->get_field_names(
        indexed => 1,   # optional, restricts list to only indexed  
fields
    );

This method is used internally by Searcher/QueryParser during  
$searcher->search when supplied with a query string instead of a Query  
object.  It's not going away before 0.20, and then you'll have to be  
dealing with Schema and a modified QueryParser API anyhow.

Marvin Humphrey
Rectangular Research
http://www.rectangular.com/




More information about the KinoSearch mailing list