Using ComplexPhraseQueryParser in Datastax search - solr

I want to perform complex searches in Datastax search. On solr wiki page, it is suggested to use a complex phrase query parser to do the work (https://cwiki.apache.org/confluence/display/solr/Other+Parsers#OtherParsers-ComplexPhraseQueryParser) However, the syntax did not work - so it seems i need to plug it in additionally.
I am using Datastax enterprise 4.5. Is there any particular procedure to plug in the parser - maybe put it in particular location and make specific changes to get it started?

Complex phrase query parser was added in Solr 4.8. DSE 4.5 and DSE 4.6 is on Solr 4.6. DSE 4.7 (which is not available yet) will contain Solr 4.10 which will include the complex phrase query parser.

Related

how to find out what Solr version is DSE using

I am trying to find out what Solr version our DSE setup is using. I know it uses a custom modified solr, but I want to know the index Lucene version.
Apart from opening an index with Luke, is there somewhere where DSE shows this info? I don't see it in the Solr admin overview.
EDIT: I am only counting on looking at the setup, not any doc
Check the release notes:
http://docs.datastax.com/en/datastax_enterprise/4.8/datastax_enterprise/RNdse.html
You can also see it in your system.log on startup.
Note: solr and lucene versions are the same now that they are a single project:
https://github.com/apache/lucene-solr/releases
In the solrconfig.xml, there is usually a line such as this:
<luceneMatchVersion>5.3.0</luceneMatchVersion>
This gives you the minimum version of Lucene required.

Solr : Stemming words Using Solr

I am learning solr and want to use solr for stemming words.I'll be passing the word to the solr and it should send the stemmed word back.I know how to configure solr core for different stemming patterns and also i am able to view their stemmed words in the analyzer (solr admin ui) but i am not sure how to achieve this using java code.I am able to index and query using java api.
I am using solr-5.3.0.
If you need to just stem the words I would recommend you not to use the whole Solr. Just use the code they use for stemming or something similar. E.g. you can use
org.apache.lucene.analysis.en.PorterStemmer.stem(String)
Unfortunately PorterStemmer has package level access so I would just copy it from the sources or you can search the Internet for some other stemmer implementations. I hope that helps.
Good luck!

Testing SOLR to Elasticsearch data transfer

I have recently moved my entire SOLR documents into Elasticsearch after creating an exact equivalent mapping of the schema.xml . To test the accuracy, i created about 120 lucene queries and queried it on SOLR and elasticsearch.
However on testing the hitcounts for 17/120 queries differed between SOLR and elasticsearch.Could there be any reasons for this apart from the analyzers, tokenizers, filters defined in schema.xml/ elasticsearch mappings. The SOLR version is 4.3.0 whereas the elasticsearch version is 1.3.2
The elasticsearch query i used is :
{"query_string":{"query":lucene_query}}
Please let me know, if there is any alternative way to test the query accuracy between SOLR and Elasticsearch.
First, make sure that you are using the same semantics. For example, same filters, tokenizers, stemmers.
Also, Apache Solr 4.3.0 is built on Apache Lucene 4.3.0 , while ElasticSearch 1.3.2 is built on Apache Lucene 4.9.0
This might not be the issue, I don't know to be honest. But if I were you, I would check the release notes of Apache Lucene > 4.3.0 and see what is changed.

Solr field collapsing

I read
http://wiki.apache.org/solr/FieldCollapsing
and I tried the query
http://192.168.0.1:8080/solr/append/select?q=mobile&group=true&group.field=brand
and I don't see the field collapsing. I mean I see the results, but not the grouping. My understanding is it should work, nothing to change in the solrconfig.xml ? In my schema, all my field are stored/index. My index is Lucene 2.9 and my Solr is 1.4.1. I don't see what I doing wrong...
Field collapsing is not available in Solr 1.4.1. You need Solr 3.3 or 4.0 (currently unreleased).
The wiki page about field collapsing also explains "If you haven't already, get a recent nightly build of Solr4.0 or Solr3.3..."
Look for "warning tags" in the Solr wiki that show when a particular feature is available only since a particular version of Solr:

How to install for Solr 1.4 ( or 1.4.1 ) Extended Dismax (edismax) plugin and how to configure it?

Im using Solr1.4 , with dismax SearchHandler , I'm new to solr ;), it seems not supporting lucene syntax , it does not even match lowercase uppercase terms ( if you know how to do this it will be helpfull ).
I want to try the edismax, (Extended Dismax) with solr 1.4 or 1.4.1 , I found it in solr 4.0 dev version, there is not a lot of documentation about it .
I'm using solr with windows server.
Is it possible to patch my current version to use edismax?
what about edismax configuration, does it use the same params as the standard dismax?
Since edismax is an experimental, not-yet-finished feature, you'll have to get the Lucene/Solr source code, and build it.
Again because this is not released, your only documentation are the JIRA comments and source code.

Resources