开发者

Return metadata fields in Google Search Appliance result

开发者 https://www.devze.com 2023-02-07 17:19 出处:网络
I\'m working with a Google Search Appliance machine using the feed type metadata-and-url. I posted the feed to the GSA machine sucessfully, but when I do a search (using my appliance URL) to get the

I'm working with a Google Search Appliance machine using the feed type metadata-and-url.

I posted the feed to the GSA machine sucessfully, but when I do a search (using my appliance URL) to get the XML from the GSA machine, I cannot see the metadata in the returning XML. Should I use some querystring parameter?

Any idea?

This is the xml posted to the GSA machine:

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE gsafeed PUBLIC "-//Google//DTD GSA Feeds//EN" "">
<gsafeed>
  <header>
    <datasource>TestXMLFeed</datasource>
    <feedtype>metadata-and-url</feedtype>
  </header>
  <group>
    <record url="http://www.WHATEVERURL" action="add" mimetype="text/html" lock="true">
      <metadata>
        <meta name="Creator" content="testcreator"/>
        <meta name="Project" content="testproject"/>
        <meta name="TypeOfContent" content="testtypeofcontent"/>
      </metadata>
    </record>
  </group>
</gsafeed>

This is what I get from the search:

<GSP VER="3.2">
     <TM>0.010752</TM>
     <Q>Test page</Q>
     <PARAM name="q" value="testpage" original_value="testpage"/>
     <PARAM name="site" value="test" original_value="test"/>
     <PARAM name="sort" value="date:D:L:d1" original_value="date:D:L:d1"/>
     <PARAM name="oe" value="UTF-8" original_value="UTF-8"/>
     <PARAM name="ie" value="UTF-8" original_value="UTF-8"/>
     <PARAM name="ud" value="0" original_value="0"/>
     <PARAM name="ip" value="whateverip" original_value="whateverip"/>
     <PARAM name="access" value="p" original_value="p"/>
     <RES SN="1" EN="1">
      <M>1</M>
      <XT/>
      <R N="1">
        <U>http://www.WHATEVERURL</U>
        <UE>http://www.WHATEVERURL</UE>
        <T>T开发者_高级运维est title</T>
        <RK>8</RK>
        <CRAWLDATE>1 Feb 2011</CRAWLDATE>
        <FS NAME="date" VALUE=""/>
        <S>
            Summary test
        </S>
        <LANG>es</LANG>
           <HAS>
           <L/>
           <C SZ="5k" CID="o7iCf_ghuzAJ" ENC="UTF-8"/>
        </HAS>
      </R>
     </RES>
</GSP>


Add the parameter &getfields=* to your google search appliance search url page.

And for filtering after on those metadata is necessary to add partialfields=Creator:testcreator in the querystring too.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号