Siren
Notify users when a new version of your iOS app is available, and prompt them with the App Store link. Siren is a Swift port of the Objective-C 'Harpy' project.
Arthur Sabintsev | Lead iOS Developer at The Washington Post | Bio & Portfolio
I am using siren in my application that interacts with solr. I know how to index data into Solr(/solr/update),but I can't figure out how to index using siren. Does it even support indexing? Also, can we use sparql queries to index data in Solr?
Source: (StackOverflow)
Is it possible in SIREn to work with N-Tuples values(by names) in the SolrDocument? I want to parse query results without regexp of the response string.
Something like:
SolrDocument.getField("ntriple","name"); // get "Jim Maple" value for '<http:/example.org/schema/name> predicate
More details:
//N-Tuple from the IndexQueryNTriple.java file
private final String[] doc1 =
{ "http:/example.org/person/jim",
"<http:/example.org/person/jim> <http:/example.org/schema/type> <http:/example.org
/schema/Person> .\n" +
"<http:/example.org/person/jim> <http:/example.org/schema/name> \"Jim Maple\" .\n"
};
final SolrInputDocument document1 = new SolrInputDocument();
document1.addField("url", doc1[0]);
document1.addField("ntriple", doc1[1]);
add(document1);
final SolrQuery query2 = new SolrQuery();
query2.setQueryType("siren");
query2.set(SirenParams.NQ, "* <name> 'john AND gartner'"); // ntriple query
final QueryResponse response2 = server.query(query2);
for (SolrDocument d : response2.getResults()) {
///?????? want to get 'name' value from the long N-Triple string with ALL values
d.getField("ntriple","name"); // get "Jim Maple" value
}
Source: (StackOverflow)
As siren documentation explains, the file located in tomcat/conf/Catalina/localhost
must set the path of the war file. I have tried with the absolute path, but I wanted to used a relative path, because it is not only me who will use siren.
siren.xml
<Context docBase="/../../../webapps/siren" debug="0" crossContext="true" >
<Environment name="siren/home" type="java.lang.String" value="/../../../webapps/siren" override="true" />
</Context>
But running my tomcat I get this error:
GRAVE: Error running static resources
java.lang.IllegalArgumentException: Document /webapps/siren does not exist or is not a readable directory
How could I set up this configuration??
Thanks in advance
Source: (StackOverflow)
I am trying to use Siren as a plugin on ElasticSearch for a poc. I want to do searches which would give exact match on the string values. I set the analyzer in elasticsearch.yml file as follows :
siren:
analysis:
datatype:
http://www.w3.org/2001/XMLSchema#string:
index_analyzer: not_analyzed.
I tried to set index:not_analyzed in SIREn mapping file as follows :
{
"workflow" : {
"properties" : {
"_siren_source" : {
"index" : "not_analyzed",
"analyzer" : "concise",
"postings_format" : "Siren10AFor",
"store" : "no",
"type" : "string"
}
},
"_siren" : {}
}
}
But still I am not getting the exact search result. I am getting the partial search result only.
Please help me out.
Also I have data stored as file path values like 'user/cloudera/myFolder' which I need to search on. Right now when I do a search with a value like that the search fails with parse Errors. Why is it throwing the error?
Source: (StackOverflow)
My json content stored in a file:
{
"vms": [
{
"component": "pgdb",
"count": "1",
"endpoints": "80:8080,5432:5432"
},
{
"component": "mq",
"count": "1",
"endpoints": "80:8080,5672:5672,15672:15672"
},
{
"component": "ucms",
"count": "1",
"endpoints": "80:80,8080:8080"
},
{
"component": "wsgw",
"count": "1",
"endpoints": "8080:8080,9093:9093"
}
]
}
in irb :
require 'json'
require 'Siren'
json = File.read('c:\\stack1.json')
irb(main):022:0> Siren.query "$.vms..[? @.component == ucms ]", json
=> []
I am trying to draft a query that will search on component name and return the value of endpoints.
Any help/pointers will be appreciated.
Thanx
Source: (StackOverflow)