Search This Blog

Friday, November 10, 2006

Tech Tip: There's a new operator in town – inmeta


There was talk in the Google Search Appliance group this week about the new inmeta query operator; I thought it's time to introduce this new feature to a wider audience.

In a recent release of the Google Search Appliance we added the inmeta query operator allowing search-users to easily create more advanced queries based on meta tag values. The appliance has had this capability for a long time using the requiredfields and partialfields parameters as part of the search API protocol. The inmeta operator allows search users to issue partialfields and requiredfields type searches directly from the search box (in the q= parameter).

The syntax is pretty simple:

inmeta:{meta_tag}
inmeta:{meta_tag}~{meta_tag_value}
inmeta:{meta_tag}={meta_tag_value}
The first query syntax shows how to issue a requiredfields search, which will restrict the results to any containing the meta tag specified. The second will execute a partialfields search with a value, matching any results that have that meta tag with a value matching some or all of the value specified in the query. The third is how to issue a requiredfields search matching the exact value specified in {meta_tag_value}.

For example, if you had content source with all documents having meta tag author and each document having a different value for author meta tag such as john, rajesh, mike, etc. A search-user may be interested in the documents that provide information about "Q3 Revenue" but restrict to only those documents that were authored by John, as John the CFO of the organization. To express such a query she would simply enter a query like:

Q3 revenue inmeta:author=john

Now, if you didn't know that the data was well formatted, and some might have John's full name (John Smith), and some might have his email address (john@acme.com) then you would want to use the following syntax:

Q3 revenue inmeta:author~john

As you see from the above examples, it is very easy to express your queries and perform advanced, sophisticated searches across structured, semi-structured, and unstructured information. We welcome the new inmeta operator to the search town!

No comments:

Post a Comment

Related Posts Plugin for WordPress, Blogger...