Return metadata fields in Google Search Appliance result - google-search-appliance

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>Test 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.

Related

Freeswitch: mod_xml_curl and call groups

I am currently switching from static configs to using mod_xml_curl and have encountered a problem with setting up call groups.
Inside my dialplan (served dynamically, working as expected) I am bridging to a group:
<action application="bridge" data="${group_call(call-group#domain-a.com)}"/>
Freeswitch is making a request with section=directory&action=group_call to the web server, to which I respond with a chunk of the directory containing the group and all relevant users:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="freeswitch/xml">
<section name="directory">
<domain name="domain-a.com">
<params>
<param name="dial-string" value="{presence_id=${dialed_user}#${dialed_domain}}${sofia_contact(${dialed_user}#${dialed_domain})}" />
</params>
<variables>
<variable name="user_context" value="domain-a.com" />
</variables>
<group name="call-group">
<users>
<user id="john" number-alias="1000">
<params>
<param name="password" value="1234" />
<param name="vm-password" value="1000" />
</params>
<variables>
<variable name="toll_allow" value="domestic,international,local" />
<variable name="accountcode" value="1000" />
<variable name="outbound_caller_id_name" value="John at domain-a.com" />
<variable name="outbound_caller_id_number" value="1234567" />
</variables>
</user>
<user id="lucy" number-alias="1001">
<params>
<param name="password" value="1234" />
<param name="vm-password" value="1000" />
</params>
<variables>
<variable name="toll_allow" value="domestic,international,local" />
<variable name="accountcode" value="1001" />
<variable name="outbound_caller_id_name" value="Lucy" />
<variable name="outbound_caller_id_number" value="12345678" />
</variables>
</user>
</users>
</group>
</domain>
</section>
</document>
However, group_call() seems to fail and in the logs I get ``:
2016-02-24 10:42:14.249534 [DEBUG] mod_dptools.c:1498 SET sofia/internal/michael#domain-a.com [call_timeout]=[15]
2016-02-24 10:42:14.529107 [CONSOLE] mod_xml_curl.c:323 XML response is in /tmp/2f772a8a-4c3a-46f2-834f-b9ba2c735feb.tmp.xml
EXECUTE sofia/internal/michael#domain-a.com bridge(error/NO_ROUTE_DESTINATION)
Perhaps anyone has experience setting up group calls with mod_xml_curl and could explain what exactly Freeswitch is expecting in the response?
After a little gnashing of teeth, I got this working. The clue was here underneath the group_call description:
Please note: If you need to have outgoing user variables set in leg B,
make sure you don't have dial-string and group-dial-string in your
domain or dialed group variables list; instead set dial-string or
group-dial-string in the default group of the user. This way
group_call will return user/101 and user/ would set all your user
variables to the leg B channel.
So, when you receive an action of type group_call, move the dial-string param to the group level, so instead of
<domain name="domain-a.com">
<params>
<param name="dial-string" value="{presence_id=${dialed_user}#${dialed_domain}}${sofia_contact(${dialed_user}#${dialed_domain})}" />
</params>
<variables>
<variable name="user_context" value="domain-a.com" />
</variables>
<group name="call-group">
<users>
<user id="john" number-alias="1000">
...
send this
<domain name="domain-a.com">
<variables>
<variable name="user_context" value="domain-a.com" />
</variables>
<group name="call-group">
<params>
<param name="dial-string" value="{presence_id=${dialed_user}#${dialed_domain}}${sofia_contact(${dialed_user}#${dialed_domain})}" />
</params>
<users>
<user id="john" number-alias="1000">
...
After I made that change, everything was hunky dory. Cheers!
It's related to your dialplan.It's not generated perfectly. just check the domain-a.com context in the dialplan.

isVid parameter in Brightcove

Good morning,
does anybody know anything about the purpose of the value: <param name="isVid" value="true" /> in the brightcove player-configuration?
on the website they just say that it's a bool-value and has to be set to "true". Nothing about what it's doing.
The parameter isVid is required when you embbed a video inside an HTML file,
<script language="JavaScript" type="text/javascript" src="
http://admin.brightcove.com/js/BrightcoveExperiences.js"></script>
<object id="myPlayer" class="BrightcoveExperience">
<param name="bgcolor" value="#FFFFFF" />
<param name="width" value="486" />
<param name="height" value="412" />
<param name="playerID" value="1234567890" />
<param name="playerKey" value="AQ~~,AAAAstMe5SE~,5vOZ123456789bOfHyhc1i" />
<param name="isVid" value="true" />
<param name="#videoPlayer" value="ref:myVid12345" />
</object>
I think is not well described on the docs...
isVid: Boolean Required to be true for all video players.
http://support.brightcove.com/en/video-cloud/docs/player-configuration-parameters

Getting XML node matching XPath expression

I'm hoping you can help with this. I tried a number of XPath testers online and wasn't able to find a solution.
I'm trying to get the value of the first node with the '~tid' attribute from this XML:
<Response status="ok" version="1.1">
<Action>
<Page>
<Params>
<Param name="~tid" value="1345811517165"/>
<Param name="~action-type" value="DATA"/>
<Param name="~from-page" value="login"/>
<Param name="~from-act" value="submitData"/>
<Param name="login_USERNAME" value="" type="0"/>
<Param name="login_PASSWORD" value="" type="0"/>
</Params>
</Page>
<Data name="clientData" method="POST">
<Params>
<Param name="timezoneoffset" value=""/>
<Param name="daylightsavings" value=""/>
</Params>
</Data>
</Action>
<Action>
<Page>
<Params>
<Param name="~tid" value="1345811517165"/>
<Param name="~action-type" value="NAV"/>
<Param name="~from-page" value="login"/>
<Param name="~from-act" value="resetPassword"/>
<Param name="~to-page" value="login_resetPassword"/>
</Params>
</Page>
</Action>
<Action>
<Page>
<Params>
<Param name="~tid" value="1345811517165"/>
<Param name="~action-type" value="NAV"/>
<Param name="~from-page" value="login"/>
<Param name="~from-act" value="newUser"/>
<Param name="~to-page" value="login_newUser"/>
</Params>
</Page>
</Action>
</Response>
The XPath I'm using is:
//Params[1]/Param[#name='~tid']/#value
It gets all three values. How can I get just the first one?
Try
/descendant::Params[1]/Param[#name='~tid']/#value
From the W3C XPath specification:
NOTE: The location path //para[1] does not mean the same as the location path /descendant::para[1]. The latter selects the first descendant para element; the former selects all descendant para elements that are the first para children of their parents.
This is the second most FAQ in XPath.
Use:
(//Params/Param[#name='~tid'])[1]/#value
Or even:
(//Param[#name='~tid'])[1]/#value
Explanation:
The XPath pseudo-operator // has lower precedence (priority) than the [] operator.
The usual solution in any laguage when default priority needs to be overriden is to use brackets that explicitly specify the new, wanted priorities.

How to filter items in Outlook View Control

I'd like to show content of outlook inbox folder filtered to particular subject using Outlook View Control. I try different parameters to Filter and Restriction parameters (like "Subject"="Test", Subject:"Test" etc), but it don't work. All items are displayed. I'm testing it on Outlook 2010 32 bit.
Thanks for suggestions
Sample Code:
<html>
<head>
<title>Outlook view filter test</title>
</head>
<body topmargin=0 leftmargin=0 scroll=no>
<OBJECT classid=CLSID:0006F063-0000-0000-C000-000000000046 id=tasks height="30%" width="50%">
<param name="Folder" value="Inbox">
<param name="Namespace" value="MAPI">
<param name="Restriction" value="[subject]:'Test'">
<param name="Filter" value="[subject]:'Test'">
<param name="DeferUpdate" value="0">
</OBJECT>
</body>
</html>
You don't want to use Filter, as the documentation says:
represents the Distributed Authoring and Versioning (DAV) Searching and Locating (DASL) statement used to restrict the display to a specified subset of data. Read/write
Instead just use Restriction. With Restriction = means contains, see documentation: https://msdn.microsoft.com/EN-US/library/office/ff865641.aspx
<html>
<head>
<title>Outlook view filter test</title>
</head>
<body topmargin=0 leftmargin=0 scroll=no>
<OBJECT classid=CLSID:0006F063-0000-0000-C000-000000000046 id=tasks height="30%" width="50%">
<param name="Folder" value="Inbox">
<param name="Namespace" value="MAPI">
<param name="Restriction" value="[Subject]='Test'">
<param name="DeferUpdate" value="0">
</OBJECT>
</body>
</html>

MVC3 Razor Camtasia Video Embedding, # param Error :-(

Greetings Community!
<object id="myExperienceXXXXXXXX" class="BrightcoveExperience">
<param name="bgcolor" value="#FFFFFF" />
<param name="width" value="448" />
<param name="height" value="251" />
<param name="playerID" value="XXXXXXXXXX" />
<param name="playerKey" value="XXXXXXXXXXX" />
<param name="isVid" value="true" />
<param name="dynamicStreaming" value="true" />
<param name="#videoPlayer" value="XXXXXXXXXXXXX" />
</object>
Notice the last line , I get the following error:
Compiler Error Message: CS0103: The name 'videoPlayer' does not exist in the current context
This value is Required by Camtasia to embed my video in my page. I'm sure there is a simple solution, but I need the "#" sign before the videoPlayer value.
Thanks in advance for any assistance.
# is a reserved character in Razor which should normally be followed by a server side expression. Double it if you want to output it literally:
<param name="##videoPlayer" value="XXXXXXXXXXXXX" />
The # symbol is a reserved character in the Razor view engine. If you want to output a # symbol you can use two # characters to escape the first.
For example:
<param name="##videoPlayer" value="XXXXXXXXXXXXX" />
Not work with the above answers!
It should be the format like this:
<param name="#("#videoPlayer")" value="XXXXXXXXXXXXX" />

Resources