Question

I've set up a new OSS to handle search on a forum. The basic setup was rather straight forward but upon tweaking it I've gotten stuck. The issue is that the pages have a custom meta tag like this:

<meta name="searchtype" content="construction_collection" />

I have set up a field in my Schema with the same name and then added it to the returned fields in the query. However that tag in the result xml is always empty:

<result name="response" numFound="173" collapsedDocCount="0" start="0" rows="10" maxScore="2357,006" time="6">
    <doc score="2357,006" pos="0" docId="4008">
        <field name="searchtype"/>

and I fail to comprehend how to setup the Parser and Crawler in order to connect these. Some threads here insinuate that it should work automatically, but it doesn't. Surely I need to set up something more. What have I missed?

/Simon

Was it helpful?

Solution

By default, the HTML parser of OpenSearchServer try to extract only the visible information of the Web page.

It is possible to retrieve information stored in meta only if they use a specific syntax. Your meta should be in the form:

<meta name="opensearchserver.field.searchtype" content="contruction_collection" />

You can also populate several fields:

<meta name="opensearchserver.field.searchtype.anotherfield" content="contruction_collection" />
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top