Search over multicore index without same schema solr - search

I use Solr, and i would like to know if i can search over multiple index using multicore. I know there is "Distributed Search" but i think it's only for index with same schema.
Thanks.

no we can search with different schema also but only thing is it will search in common field..See this for more information .
Further for manipulation we can use solrj. else if only in solr .. read about Core Admin Handler
let me know if you need any help further.

Related

How can I find alfresco empty foldres using Lucene Query

I want to retrieve the list of folders in a specific node whose list of childrens is empty using Lucene query.
I create this query:
+PATH:"/app:company_home/cm:contexts/cm:ctx_exploitation/cm:runs/cm:Run_322645//."+Children is empty.
but it does not give good results.
What is the right Lucene syntax to do this
There is no way to find empty folders using a Lucene query.
However, there are some java services and javascript APIs in alfresco
like 'FileFolderService' in Java and 'childByNamePath' in javascript,
using them you can write your logic and find empty folders.
You can find o bytes file using below lucene query.
TYPE:"cm:content" AND #cm:content.size:0

ElasticSearch,mongoDB,nodejs for live search

I am using using MongoDB(3.0.3),Elastic Search(1.7.1) , NodeJS.
Actually in our Database we have multiple collections like task , users , jobs , events etc Now we want full text search on Multiple collections in MongoDB but till now MongoDB does not provide that . So we use elastic search for fulltext search from multiple collections .
We want that whatever we insert in MongoDB in these collections jobs,events,users etc is automatically save into Elastic Search index and it is available for searching instantaneously . Is there any npm module which can help me or any other ideas .
After searching on this I found https://github.com/richardwilly98/elasticsearch-river-mongodb and https://github.com/mongoosastic/mongoosastic
So which is better and easy to use ? or any other solution
Rivers have been deprecated:
https://www.elastic.co/blog/deprecating-rivers
If you're already using Mongoose then Mongoosastic seems like a good choice. You should check if it's features concerning search fulfill your needs.

PouchDB get documents by ID with certain string in them

I would like to get all documents that contain a certain string in them, I can't seem to find a solution for it..
for example I have the following doc ids
vw_10
vw_11
bmw_12
vw_13
bmw_14
volvo_15
vw_16
how can I get allDocs with the string vw_ "in" it?
Use batch fetch API:
db.allDocs({startkey: "vm_", endkey: "vm_\ufff0"})
Note: \ufff0 is the highest Unicode character which is used as sentinel to specify ranges for ordered strings.
You can use PouchDB find plugin API which is way more sophisticated than allDocs IMO for querying. With the PouchDB find plugin, there is a regex search operator which will allow you do exactly this.
db.find({selector: {name: {$regext: '/vw_'}}});
It's in BETA at the time of writing but we are about to ship a production app with it. That's how stable it has been so far. See https://github.com/nolanlawson/pouchdb-find for more on Pouch Db Find
You better have a view with the key you want to search. This ensures that the key is indexed. Otherwise, the search might be too slow.

Honoring previous searches in the next search result in solr

I am using solr for searching. I wants to improve my search result quality based on previously searched terms. Suppose, I have two products in my index with names 'Jewelry Crystal'(say it belongs to Group 1) & 'Compound Crystal'(say it belongs to Group 2). Now, if we query for 'Crystal', then both the products will come.
Let say, if I had previously searched for 'Jewelry Ornament', then I searches for 'Crystal', then I expects that only one result ('Jewelry Crystal') should come. There is no point of showing 'Compound Crystal' product to any person looking for jewelry type product.
Is there any way in SOLR to honour this kind of behavior or is there any other method to achieve this.
First of all, there's nothing built-in in Solr to achive this. What you need for this is some kind of user session, which is not supported by Solr, or a client side storage like a cookie or something for the preceding query.
But to achive the upvote you can use a runtime Boost Query.
Assuming you're using the edismax QueryParser, you can add the following to your Solr query:
q=Crystal&boost=bq:(Jewelry Ornament)
See http://wiki.apache.org/solr/ExtendedDisMax#bq_.28Boost_Query.29

How to implement faceted search suggestion with number of relevant items in Solr?

Hi
I have a very specific need in my company for the system's search engine, and I can't seem to find a solution.
We have a SOLR index of items, all of them have the same fields, with one of the fields being "Type", (And ofcourse, "Title", "Text", and so on).
What I need is: I get an Item Type and a Query String, and I need to return a list of search suggestion with each also saying how meny items of the correct type will that suggested string return.
Something like, if the original string is "goo" I'll get
Goo 10
Google 52
Goolag 2
and so on.
now, How do I do it?
I don't want to re-query SOLR for each different suggestion, but if there is no other way, I just might.
Thanks in advance
you can try edge n-gram tokenization
http://search.lucidimagination.com/search/document/CDRG_ch05_5.5.6
You can try facets. Take a look at my more detailed description ('Autocompletion').
This was implemented at http://jetwick.com with Solr ... now using ElasticSearch but the Solr sources are still available and the idea is also the identical https://github.com/karussell/Jetwick
The SpellCheckComponent of Solr (that gives the suggestions) have extended results that can give the frequency of every suggestion in the index - http://wiki.apache.org/solr/SpellCheckComponent#Extended_Results.
However, the .Net component SolrNet, does not currently seem to support the extendedResults option: "All of the SpellCheckComponent parameters are supported, except for the extendedResults option" - http://code.google.com/p/solrnet/wiki/SpellChecking.
This is implemented using a facet field query with a Prefix set. You can test this using the xml handler like this:
http://localhost:8983/solr/select/?rows=0&facet=true&facet.field=type&f.type.prefix=goo

Resources