search within meta data?

Post Reply
User avatar
Thunderstone
Site Admin
Posts: 2504
Joined: Wed Jun 07, 2000 6:20 pm

search within meta data?

Post by Thunderstone »




I made an index of some html files, and included this:
-meta=author,date,keywords

Sure enough, the meta tags for <meta name=AUTHOR ...>
and <meta name=DATE ...> were processed.

But how do I search on them? I want to search
for all files written by a certain AUTHOR.
What's the syntax for that? I'm using the default
search form that came with webinator.

bobg




User avatar
Thunderstone
Site Admin
Posts: 2504
Joined: Wed Jun 07, 2000 6:20 pm

search within meta data?

Post by Thunderstone »



The meta field is indexed along with the rest by default. Nothing
special is required to search Title, Meta, and Body at once.

If you want to search just Meta, you would have to create
a metamorph inverted index on the Meta field.
See http://www.thunderstone.com/texisman/node120.html
Something like:
gw -st "create metamorph inverted index xmmeta on html(Meta)"
And adjust your search script to search "Meta" instead of "Title\Meta\Body".
You will also need to reissue that create statement after walking new
pages with gw, as gw won't know about your custom index.




User avatar
Thunderstone
Site Admin
Posts: 2504
Joined: Wed Jun 07, 2000 6:20 pm

search within meta data?

Post by Thunderstone »



Yes.



dietric
Posts: 100
Joined: Fri May 20, 2005 10:57 am

search within meta data?

Post by dietric »

What if I want to search for any term but limit the results to pages containing (a) certain meta tag(s) value(s)?
User avatar
mark
Site Admin
Posts: 5513
Joined: Tue Apr 25, 2000 6:56 pm

search within meta data?

Post by mark »

Add an "and Meta like $metaquery" clause to the sql in the search script and set metaquery to the desired value.
dietric
Posts: 100
Joined: Fri May 20, 2005 10:57 am

search within meta data?

Post by dietric »

Hmm... we're using the search applicance, so we're just passing this as a URL paramter - will that work?
User avatar
mark
Site Admin
Posts: 5513
Joined: Tue Apr 25, 2000 6:56 pm

search within meta data?

Post by mark »

You posted to a webinator group so my answer was based on using webinator. You can't modify the scripts on the appliance. On the appliance you'll just have to include the meta search terms in the main query. It searches both content and meta data.
Post Reply