[KinoSearch] question on querying by url
Kevin Kamel
kamelkev at gmail.com
Mon Apr 17 08:04:07 PDT 2006
Hi Fil,
I'm pretty sure that the search syntax that you are trying isn't
supported by Kinosearch. Prefixing search terms with "url:" is a syntax that
is supported by the Plucene and Lucene parsers, but I have not seen any
documentation in the KinoSearch CPAN docs to indicate that this is
supported.
I think we are actually doing something similar. I have several fields
that I am indexing separately, and I want to be able to search through all
of them, potentially in combination with eachother (this and that,
specifically), like a standard search engine type of search.
In order to accomplish this I had to use a combination of terms to store
my query strings, instantiate TermQueries to create query objects using the
terms, and finally create combination queries using the BooleanQuery object.
I suggest you look at this page for pretty specific instructions on how to
proceed:
http://search.cpan.org/~creamyg/KinoSearch/lib/KinoSearch/Search/BooleanQuery.pm<http://search.cpan.org/%7Ecreamyg/KinoSearch/lib/KinoSearch/Search/BooleanQuery.pm>
- Kevin Kamel
On 4/17/06, Filippo A. Salustri <salustri at ryerson.ca> wrote:
>
> Hi,
>
> I'm using v0.09_03 and my app is running fine, except for one thing.
>
> At times, I need to search for a specific record, by url. The field in
> question is called "url". If I search for a given resource using other
> fields, it does turn up in the results, so I know it's there. But when
> I search for it by url, it's not found.
>
> The fields I use are defined as follows.
> > $ki->spec_field ( name => 'url', boost => 1, indexed => 1, analyzed =>
> 1,
> > stored => 1, compressed => 0 );
> > $ki->spec_field ( name => 'body', boost => 1, indexed => 1, analyzed
> => 1,
> > stored => 1, compressed => 1 );
> > $ki->spec_field ( name => 'title', boost => 1, indexed => 1, analyzed
> => 1,
> > stored => 1, compressed => 0 );
> > $ki->spec_field ( name => 'tags', boost => 10, indexed => 1, analyzed
> => 1,
> > stored => 1, compressed => 0 );
> > $ki->spec_field ( name => 'date', boost => 1, indexed => 1, analyzed
> => 1,
> > stored => 1, compressed => 0 );
>
> where $ki is the InvIndexer.
>
> Say the url I want to search for is by
> $q = "http://deseng.ryerson.ca/~fil";
> I then do:
> > my $ks = KinoSearch::Searcher->new
> > ( invindex => "$serfcgi/db",
> > analyzer => KinoSearch::Analysis::PolyAnalyzer->new(language =>
> 'en'),
> > );
> > return $ks->search($q);
>
> I get an error saying that "http" is not a valid field name. That's
> cool - I understand why it would do that.
>
> So I do
> $q = "url:http://deseng.ryerson.ca/~fil";
>
> Now the search returns 0 hits.
>
> Any ideas on what I'm doing wrong?
>
> Cheers.
> Fil
> --
> Prof. Filippo A. Salustri, Ph.D., P.Eng.
> Department of Mechanical and Industrial Engineering
> Ryerson University Tel: 416/979-5000 x7749
> 350 Victoria St. Fax: 416/979-5265
> Toronto, ON email: salustri at ryerson.ca
> M5B 2K3 Canada http://deseng.ryerson.ca/~fil/
>
> _______________________________________________
> KinoSearch mailing list
> KinoSearch at rectangular.com
> http://www.rectangular.com/mailman/listinfo/kinosearch
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rectangular.com/pipermail/kinosearch/attachments/20060417/6406c97d/attachment-0001.htm
-------------- next part --------------
_______________________________________________
KinoSearch mailing list
KinoSearch at rectangular.com
http://www.rectangular.com/mailman/listinfo/kinosearch
More information about the kinosearch
mailing list