Sylius 1.0 with elasticsearch - sylius

I recently upgrade sylius from 0.18 to 1.0#dev and I lost the elasticsearch support since SyliusSearchBundle is not included in core anymore.
I have no search nor facetting anymore.
What I tried :
I have added manually SyliusSearchBundle
I made a few fixes in configuration
I launched sylius:search:index command
My products are fully indexed. But now that taxon pages are handled as Resources, the queries are made directly on the database, not elasticsearch.
What are the steps required to query elasticsearch for taxon page ?
On the documentation page for SyliusResourceBundle I can see that
Elasticsearch is not yet supported :
So far we support:
Doctrine ORM
Doctrine MongoDB ODM
Doctrine PHPCR ODM
InMemory (soon)
ElasticSearch (maybe)
Does it means I have to write a custom controller for taxon page ?
Thanks for your help

You do not want the storage driver to be elasticsearch for you resources, but rather let it function as a secondary faster storage that you use in some cases.
I assume you are using FOSElasticaBundle so you have a nice API of working with your elasticsearch indexes.
For example when you are on a search page, you will want to have your own SearchController that uses the elasticsearch services to do the work. Then you can simply use the aggregations/facets in your template. See the FOSElasticaBundle docs for more information about this.

Related

Python / rdflib HTTP server for sparql endpoint

Is there a capability for or example of creating a Sparql HTTP endpoint with rdflib? We would want it to follow the spec and be able to return json and/or csv formats. This would mostly be for POC usage. It would also be possible to use Javascript/Node.
Thanks!
You might try https://github.com/rdflib/pyLDAPI. It's been touched much more recently than https://github.com/RDFLib/rdflib-web and there are some public examples of it to follow, e.g. https://geofabricld.net. Also, the SKOS-specific tool VocPrez uses it under the hood.
As of earlier this year, pyLDAPI implements the W3C's Content Negotiation by Profile specification which is, I suppose, the latest an greatest Linked Data API-relevant specification, although it's not just for Linked Data APIs.
Feel free to contact me directly if you need more of a hand with this.

How to queries all the assignments from the repository?

My environment:
Alfresco Share v5.2.d (r134641-b15, Aikau 1.0.101.3, Spring Surf
5.2.d, Spring WebScripts 6.13, Freemarker 2.3.20-alfresco-patched, Rhino 1.7R4-alfresco-patched, Yui 2.9.0-alfresco-20141223)
Alfresco Community v5.2.0 (r134428-b13) schema 10005
When I start the workflow, I can assign executors - the list of users who will participate in the business process. Somehow I need to get a list of all those users.
There is an excellent guide, which shows how to use Lucene to get a list of whitepapers.
To interact with repository through REST I'm also use the Web Script Framework MVC.
But how can I get the list of assignments?..
I'm interested in how to look like the query in this case:
...
var assignments = search.luceneSearch("what should be here?");
...
If you want to know who is assigned to a specific running Workflow instance, then I don't think you can easily do that via the search service. Instead, you want to be using the Alfresco WorkflowService to get that.
Most likely you'll want to grab the WorkflowInstance for the specific running workflow, grab the tasks, and check from the properties on that.
If you look at WorkflowPermissionInterceptor from the Alfresco source tree, you'll see pretty much the logic you want, covering both individual assignees and group assignments.

How to get all indexes from database in ravenDB?

Since i HATE the fact that i have to run VM with IE in order to connect to ravendb web (made with horrible silverlight) i'm loking to use ravendb's http API. So far, only conclusion is that it's docs is horrible and i can't find some options.
Right now, i would need to get the list of index-es. in certain database. However, i can't find that as an option in official docs. http://ravendb.net/docs/2.0/http-api
Does that option exist and how to get that list?
Endpoint for index list:
curl http://localhost:8080/indexes/?start=0&pageSize=256

Implementing Sitecore Search Using Lucene

I am in the process of trying to get Lucene search to work with my Sitecore installation.
I have tried following the example listed in the Sitecore guide (sections 2.1 thru 2.2.2).
After adding the LuceneSearchBox and clicking on the control's search button, I receive the following error:
Server Error
500 - Internal server error.
There is a problem with the resource you are looking for, and it cannot be displayed.
This is what appears in the address bar, in the event it provides some helpful clues:
mytestsite/sitecore/service/nolayout.aspx?item=%2fstandard_items%2fsearch_results&layout=%7b00000000-0000-0000-0000-000000000000%7d&device=Default
Should I be doing something with the LuceneSearchResults control? The guide does not mention doing anything with the LucenSearchResult control.
Notes:
I am using this on a web site that I have created, not the "Office Core Web site" listed in the guide.
I am running Sitecore 6.3.1
The most common way of working with Lucene in Sitecore is by using the Advanced Database Crawler project. Alex Shyba, a Solution Architect at Sitecore, put together a C# class library that wraps the native Lucene functionality and adds helper methods to make it easy to use Lucene to search for content in Sitecore.
There's two parts to this project: 1. Advanced Database Crawler, 2. Searcher.
Here's the URL, http://sitecoreblog.alexshyba.com/2010/11/sitecore-searcher-and-advanced-database.html?m=1.

Semantic store and entity hub

I am working on a content platform that should provide semantic features such as querying with SPARQL and providing rdf documents for the contained content.
I would be very thankful for some
clarification on the following
questions:
Did I get that right, that an entity
hub can connect several semantic
stores to a single point of access?
And if not, what is the difference
between a semantic store and an
entity hub?
What frameworks would you use to
store content documents as well as
their semantic annotation?
It is important for the solution to be able to later on retrieve the document (html page / docs such as pdf, doc,...) and their annotated version.
Thanks in advance,
Chris
The only Entityhub term that I know is belong to Apache Stanbol project. And here is a paragraph from the original documentation explaining what Entityhub does:
The Entityhub provides two main services. The Entityhub provides the
connection to external linked open data sites as well as using indexes
of them locally. Its services allow to manage a network of sites to
consume entity information and to manage entities locally.
Entityhub documentation:
http://incubator.apache.org/stanbol/docs/trunk/entityhub.html
Enhancer component of Apache Stanbol provides extracting external entities related with the submitted content using the linked open data sites managed by Entityhub. These enhancements of contents are formed as RDF data. Then, it is also possible to store those content items in Apache Stanbol and run SPARQL queries on top of RDF enhancements. Contenthub component of Apache Stanbol also provides faceted search functionality over the submitted content items.
Documentation of Apache Stanbol:
http://incubator.apache.org/stanbol/docs/trunk/
Access to running demos:
http://dev.iks-project.eu/
You can also ask your further questions to stanbol-dev AT incubator.apache.org.
Alternative suggestion...
Drupal 7 has in-built RDFa support for annotation and is more of a general purpose CMS than Semantic MediaWiki
In more detail...
I'm not really sure what you mean by entity hub, where are you getting that definition from or what do you mean by it?
Yes one can easily write a system that connects to multiple semantic stores, given the context of your question I assume you are referring to RDF Triple Stores?
Any decent CMS should be assigning documents some form of unique/persistent ID to documents so even if the system you go with does not support semantic annotation natively you could build your own extension for this. The extension would simply store annotations against the documents ID in whatever storage layer you chose (I'd assume a Triple Store would be appropriate) and then you can build appropriate query and presentation layers for querying and viewing this data as required.
http://semantic-mediawiki.org/wiki/Semantic_MediaWiki
Apache Stanbol
Do you want to implement a traditional CMS extended with some Semantic capabilities, or do you want to build a Semantic CMS? It could look the same, but actually both a two completely opposite approaches.
It is important for the solution to be able to later on retrieve the document (html page / docs such as pdf, doc,...) and their annotated version.
You can integrate Apache Stanbol with a JCR/CMIS compliant CMS like Alfresco. To get custom annotations, I suggest creating your own custom enhancement engine (maven archetype) based on your domain and adding it to the enhancement engine chain.
https://stanbol.apache.org/docs/trunk/components/enhancer/
One this is done, you can use the REST API endpoints provided by Stanbol to retrieve the results in RDF/Turtle format.