I am a new to solr working on solr version 4.8.0. I want to add/update/delete fields in the schema.xml at runtime using solrj. i can create or delete a core using solrj.
For adding documents or search using solrj, i referred this link
I want to learn advance functionality in solrj. I need any good tutorials or example code.
Can anyone please guide me?
Thanks in advance.
Solrj version 5.3 (features) introduced an experimental Schema API.
I think this page - https://wiki.apache.org/solr/SchemaRESTAPI contains all you need. Pay attention to Modifying the schema section. Although, it's not SolrJ way but it will work fine for you.
Related
what is the new approach to fetch data from solr within an extbase Service class? we previously did it with
$solrResponse = $this->solr->search('type:car', $offset, $limit);
$this->solr is an instance of
ApacheSolrForTypo3\Solr\System\Solr\SolrConnection
but the method search got removed in the newer version of the extension "apache-solr-for-typo3/solr" (currently using 9.0.2) and now i cant find the replacement for that one.
did someone else got that issue too? why we need that in an extension service? well we index an external graphQL into our TYPO3-solr.
help is much appreciated
We have switched to Solarium as a new PHP Solr Library.
https://solarium.readthedocs.io/en/stable/
or dig here:
https://github.com/TYPO3-Solr/ext-solr/tree/master/Classes/Search
HTH
Olivier
Could some provide inputs for the below
1>I want to use solr auto complete feature.If i have a core as abc, what will the solr query say for search key word "spell check".
2> How to build the query in AEM CQ5 using solrj could it be using jquery.Any sample code will be helpfull??
Thanks
look at example hope so it will help you.
https://examples.javacodegeeks.com/enterprise-java/apache-solr/solr-autocomplete-example/
I saw there was a article in the Apache wiki on OpenNLP for Solr.
Is it valid for current solr version 5.3.1?
No, if you have a look at LUCENE-2899, you'll see that the code discussed was never added to trunk. You'll have to download/patch/update the code yourself if you're going to have it native to Solr.
It's probably a better idea to do all the NLP stuff outside of Solr, then index the result in a form suited for the task you're trying to solve.
Yes. It's better to keep it outside.
Here is a small project I tried.
https://github.com/john77eipe/DeepQA
ElasticSearch has percolator for prospective search. Does SOLR have a similar feature where you define your query upfront? If not, is there an effective way of implementing this myself on top of the existing SOLR features?
besides what BunkerMentality said, it is not hard to build your own percolator, what you need:
Are the queries you want to run easy to model on Lucene only syntax? if so you are good, if not, you need to convert them to Lucene only. Built them, and keep them in memory as Lucene queries
When a doc arrives:
build a MemoryIndex containing only that single doc
run all your queries on the index
I have done this for a system ingesting millions docs a day and it worked fine.
It's listed as an open new feature, SOLR-4587, on Solr JIRA but it doesn't seem like any work has started on it yet.
There is a link in the comments there to a separate project called Luwak that seems to implement some features similar to percolator.
If it is still relevant, you can use this
It's SOLR Update Processor that based on Luwak
I am currently using Apache Solr to build a search engine. The queries in Solr are of the field:value format. Now I want to use a part-of-speech tagger to separate the subject, verb and predicate and search the values in each fields. For example, if I input "Who likes Starbucks" then I need some code to give me "q=subject:*&verb=likes&object=starbucks". Is there any library that can handle this job? Thank you!
I think several people have used UIMA for this, see solr wiki
There are a number of POS taggers. Here is another StackOverflow posting about this: What is a good Java library for Parts-Of-Speech tagging?