I'm using CMIS query to fetch documents from Alfresco. I found one big problem. Apparently CMIS doesn't support case insensitive searches. I also tried AFTS and Lucene but they're inconsistent (can't fetch a just saved document). Are there any workarounds for Alfresco to construct a case insensitive query?
Related
I am using Alfresco Community 201707 x64. My application is querying the repository via CMIS, using Apache Chemistry Open CMIS 1.1.
The question, as the title suggests, is: when querying the repository for document content (using the CONTAINS predicate on the search query), how do I retrieve a document's relevant context? Can I do it using CMIS, or do I have to use a different approach?
For example, in Alfresco Share, when a user searches the repository for documents containing some word, the relevant results are displayed with a snippet of the document's content with said word highlighted.
I do not think this is available in CMIS, it is however generally available if using SOLR, depending on Alfresco version.
http://docs.alfresco.com/5.2/concepts/search-api-highlight.html
As said by #Lista,
It is a new feature coming with Alfresco 5.2.1 : http://docs.alfresco.com/5.2/concepts/search-api-highlight.html
You can use it by making a call to the /search endpoint :
The Search API provides access to the search features of Alfresco
Content Services.
The Search API accepts POST requests containing JSON structures as
described in the table below. The JSON is structured to group options
related to different query concepts together.
The Search API is defined under the search namespace. It uses the
/search endpoint, which does not accept any URL parameters and is
therefore, completely controlled via the parameters in a POST body.
But as far as I know, this is not possible to do it by CMIS. Can you switch the way you are interacting with Alfresco (the REST way) ?
I am exploring Alfresco Web scripts and CMIS API's, and looking for an API or some way to figure out the nodes whose ACL/permission is modified after some specified time/timestamp in Alfresco.
I am able to get nodes with modified metadata using CMIS QUERY API, but regarding only ACL/permission modification its not working.
For now, I am crawling all nodes and checking its modification date with respect to earlier/last crawl datetime. This doesn't seem to be a proper approach.
For more details, here is the link of query posted earlier on alfresco forum:Fetch the list of nodes whose permission is updated/modified
Could anyone please assist.
I have figured out the solution, using CMISChangeLog application, which need to be enabled on Alfresco server. Also, with the help of CMIS 1.1 Atom Api's, the CMIS change log query works fine on both the Alfresco version, 4.x and 5.x.
I am building a web application in ASP.NET 4.5 C#. My app will be heavily relied on searching capabilities. I am searching for a high-performing searching solution for my project. I am looking at one that is efficient / fast and easy to implement.
After going over a few solution, I found ElasticSearch to offer excellent searching capabilities, as well it's supported by Amazon Web Services if I decide to deploy my project there.
However, I've read that MySQL 5.6 now features Full Text Search foor InnoDB tables. I wanted to know the difference, cons and pros of each approach in order to decide which one to use in my next project.
My main goal: being able to make very fast searches against my database and enjoy the benefits of natural language search, scoring, etc. I will actually have very small text fields of 100 characters for my searchable text fields.
Summary of my questions:
What is the foundemental differences between MySQL 5.6 Full Text Search and ElasticSearch? (advantages and disadvantages)
With MySQL Full Text Search, do I need to separate the searching index / functionality from the database (for example, with ElasticSearch I am using the ELasticSearch server which I can deploy on a different server. I wonder if that works the same with MySQL Full Text Search too?
Which one is easier to implement?
Is there any advantages of using either in ASP.NET project (like supported client libraries, etc.)
Thanks.
I'm not very familiar with MySQL 5.6 Full Text Search capabilities, but I'm using ElasticSearch in my ASP.NET Web App.
MySQL is queried in SQL, ES is queried in JSON, as it is RESTful
While MySQL is database management system itself, ElasticSearch is only a search engine. The data on which search is performed is stored in it's index (ElasticSearch data store is called index). This index sometimes likes to fail, and then you need to have your data backuped in some external database (I'm using NoSQL solution - MongoDB, as I struggle with BigData problem), from which you restore it.
ElasticSearch is distributed system. It uses Shards - when you perform search, the index is splitted into number of shards, which are searched independently by separate threads. Then search results are consolidated into one set. As scoring is calculated in some way based on number of records on which search is performed, it may be different for the same record depending on which shard it was and how many records were assigned to this shard (although it is configurable in search query options - see DFSThenFetch)
ES can be interacted with from C# code by using by NEST library, which allows you to map ES entities into C# classes and query them by LINQ, by lambda syntax (utilizing expressions more than predicates)
Querying ElasticSearch can be pretty challenging if your entities have many fields. In my case I had to implement a pretty complex Query builder, as there is very many ways of performing searching query on ElasticSearch - see http://www.elasticsearch.org/guide/reference/query-dsl/ (all those query types are implemented in NEST library). You query pretty differently for matching string, than filtering data, eg. GreaterThan or LessOEqual.
ES allows you to utilize fuzzy matching based on Levenshtein Distance, which is p retty nice when struggling with typos.
ElasticSearch is very, very fast. Where MS SQL Server searched my data (by simple query) for more than 1 minute, ES is doing it in less than 20 ms (even by using very complex query). It is distributed implementation of Lucene search engine.
I know my post is not straight answer to your questions, but I hope it provides you some info concerning ElasticSearch, and helps you in any way. Cheers.
I'm writing a ASP.net web app where users will be able to add wordy descriptions to a database table and was just wondering if there's some sort of (free) .net search plugin I could use to search through the database. I could write a simple SQL query to do it but I'd rather it be more robust and like a google search.
If your database is SQL Server, then you use SQL Server full text search. It's right there, and has google-like semantics.
you are probably looking for lucene.net which a port of lucene. Provide search capabilities for arbitrary document (so you can also index database text with it).
But I think you would rather index the html renders of your database entries (which lucene does beautifully).
when I am querying the local database instead of live database I get the following error:
Cannot use a CONTAINS or FREETEXT
predicate on table or indexed view
'Shop' because it is not full-text
indexed.
Why is this happening?
It means pretty much what it says; Full-text indexing isn't turns on for your Shop table. Full-text indexing allows all the text within a field to be searched while querying, which is what I assume you want to do.
You probably have full-text indexing turned off on your development system, but on on your live server.
Please read this page which explains how to enable it.