Given the table answers.getquestion; I was under the impression that "desc answers.getquestion" would provide a list of all the possible response fields for querying answers.getquestion. Instead it mentions question_id as a required field.
Where/How do I get a list like the one mentioned in http://developer.yahoo.com/answers/V1/getQuestion.html under response fields? Also, where can I see the mapping identifying question_id in the request to be id in the response?
In YQL, the "desc" command gives a brief summary of the table (ref: YQL docs). In your example, requesting desc answers.getquestion shows some simple info about this table:
<table hash="2143dbc888c9ccf3daac6778d0f57a32"
name="answers.getquestion" security="ANY">
<meta>
<author>James Broad</author>
<documentationURL>http://developer.yahoo.com/answers/V1/getQuestion.html</documentationURL>
<sampleQuery>select * from answers.getquestion where question_id="20090526102023AAkRbch"</sampleQuery>
</meta>
<request>
<select>
<key name="appid" private="true" type="xs:string"/>
<key name="question_id" required="true" type="xs:string"/>
</select>
</request>
</table>
To your question about the response fields, they will come directly through from the Yahoo! Answers Get Question API call. The YQL table is simply a wrapper for the underlying API, and so the results will simply flow back through YQL.
For example, you can see the results from select * from answers.getquestion where question_id="1005120800412" in the YQL console:
<Question xmlns="urn:yahoo:answers" id="1005120800412" type="Answered">
<Subject>Why is there no TITLE tag in the header of answers.yahoo.com?</Subject>
<Content>Come on, you guys. It's not valid HTML if there's no title. :) Correction: there's no TITLE tag in any of the edit screens, including the one I'm using to add these details. Sorry, my bad.</Content>
<Date>2005-12-08 08:22:33</Date>
<Timestamp>1134058953</Timestamp>
etc.
</Question>
Related
I have created a simple UI5 application which consists of a Table.
The problem is that this table shows data only when I run the application on ABAP Server on other servers, ie. Tomcat or Web App Preview in eclipse it doesn't work. I also tried this application with other open oData services but the table shows no result.
Secondly the table show the data and after it continue to scroll down the data and there comes empty fields from above and data disappears to the down.
Does anyone have any ideas?
Most likely you will be helped with disabeling the same origin policy in google chrome. See:
Disable same origin policy in Chrome.
For a more extensive answer see:
http://scn.sap.com/community/developer-center/front-end/blog/2013/06/29/solving-same-origin-policy-issue-in-different-ways
That usually happened to me when I didn't map the correct field to the "Items" of the table.
You must check both the capitalization and the path of the item in your model.
Here is a short example :
<Table id="idMaterialsList2"
items="{SalesOrder>/Items/results}">
<columns>
<Column>
<Text text="{i18n>Order_product}" />
</Column>
</columns>
<items>
<ColumnListItem type="Navigation">
<ObjectIdentifier
title="{SalesOrder>Product}"
text="{SalesOrder>Description}"/>
</ColumnListItem>
</items>
</Table>
a) Check "items="{SalesOrder>/Items/results}"" the path
b) Check the names of the elements you want to show ""{SalesOrder>Product}""
If a is correct and b is wrong you will have an empty table with X lines where X = SalesOrder>/Items/results.length.
If a is wrong you will see nothing.
Try :)
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
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" />
Using Struts2, my goal is to present a simple blog to a user using Struts2 iterators, such as:
Most Recent Topic
response 1
response 2
...
Previous Topic
response 1
response 2
...
Users generate and submit each Topic/Response using a separate form, but, once submitted, I don't want them to edit the blog.
To generate either a Topic or a Response, I provide an editor (like the stackoverflow editor I'm using now) that produces html-formatted text, including whatever styling (bold, underlines, lists, etc.) that the user chooses. The text of the Topic/Response created by the user, including the html tags, is stored in a database.
However, I cannot find a way to render the Topic/Response as html in the blog. For example, text bolded in the editor shows up as <strong>text</strong> in a struts2 s:textarea tag.
I know that the s:property tag has an 'escapeHtml' attribute that will prevent this, but the s:property tag can't layout the text properly, and it seems that only the s:property tag has this attribute.
I've tried using <input value="%{#topic.content}" /> within the iterator instead of s:textarea, but it doesn't seem to recognize the #topic iteration reference.
Is there a way to do this?
use text instated of tax area .Let me know if you still facing this issue.
Use escapeHtml="false". I just tried it myself and it works as intended.
For example, with:
<s:set var="var1"><p>some stuff</p><p>other stuff</p></s:set>
<s:property value="var1" escapeHtml="false" />
renders the paragraph tags as you would expect.
How about using <pre> with <s:property>.
About html <pre> tag:
http://www.w3schools.com/tags/tag_pre.asp
I know the id of a public yql event. Why can't I get it by simply mentioning the id in WHERE clause like this:
Click here to see my yql console
You were very close - instead of id you'll want to use the parameter event_id. Here's a modified version of your search which works:
SELECT * FROM upcoming.events WHERE event_id = "9236524" | sort(field='start_date')
For Community YQL tables like upcoming.events, you can see the allowed parameters by clicking on the "desc" link on the far right. In this case it shows that searching by event_id is one of the options:
<select>
<key name="event_id" required="true" type="xs:string"/>
</select>
In my custom list XML I added a few URL fields. one of them has to be displayed as a picture just like when you select "Format URL as: Picture" in the fields settings of the UI.
In the customList's schema.xml I haven't found any place where to override the html markup for a URL type.
Any help or clue is welcome :)
Thanks,
teebot
Try changing the Format property of the relevant fields xml Schema.
Get a copy of SharePoint Manager to try it.
<Field ID="{c29e077d-f466-4d8e-8bbe-72b66c5f205c}" Name="URL"
SourceID="http://schemas.microsoft.com/sharepoint/v3" StaticName="URL"
Group="Base Columns" Type="URL" DisplayName="URL" ColName="nvarchar3"
RowOrdinal="0" ColName2="nvarchar4" RowOrdinal2="0" Format="Image" Version="1" />