1

I'm trying to query AlchemyData News for articles narrowed by multiple entities of different types (e.g.,both the Company "IBM" and the OperatingSystem "Linux" in the body of the article) without much luck.

I can find or figure out examples for multiple entity texts in the title:

q.enriched.url.title=A[IBM^Linux]

and for single texts and types in the title:

q.enriched.url.enrichedTitle.relations.relation=|object.entities.entity.text=IBM,object.entities.entity.type=Company|

but the combination eludes me.

I'm also unsure of which field name(s) to use when searching the body of the articles instead of just the title.

David Powell
  • 537
  • 1
  • 4
  • 16

1 Answers1

1

Unfortunately, top level search ie (IBM & Company) OR (Linux & OS) isn't possible at the time. To get around this you'll have to write to distinct queries. Alchemy is currently working on infrastructure improvements that will enable top level search.

In regards to searching the body you simple need to drop enrichedTitle. in the call.

Rob Delwo
  • 11
  • 2
  • Actually, it seems that you _can_ do a top level AND search (which is what I want to do), as long as you go directly to the API. Consider this URL: `https://access.alchemyapi.com/calls/data/GetNews?apikey=[redacted] &return=enriched.url.url &start=now-60d &end=now-0d &q.enriched.url.entities.entity=|text=IBM,type=company| &q.enriched.url.entities.entity=|text=Apple,type=company| &count=10 &outputMode=json` - a spot check shows that it does appear to do what I want to do. However, I can't figure out how to do this using the watson-developer-cloud library. Is this a bug in the library? – David Powell Jan 22 '16 at 23:26
  • on a separate question but fairly similar, I am trying to use the service with multiple keywords using the query builder. when doing so I do not received any results from the api service. Is that because it does not support multiple keyword searches or the corpus did not have any results relating to it. eg: apple clean technology – patz Mar 21 '16 at 19:21