lucene-solr | Apache Lucene and Solr open-source search software | Search Engine library
kandi X-RAY | lucene-solr Summary
kandi X-RAY | lucene-solr Summary
Apache Lucene is a high-performance, full featured text search engine library written in Java. Apache Solr is an enterprise search platform written in Java and using Apache Lucene. Major features include full-text search, index replication and sharding, and result faceting and highlighting.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of lucene-solr
lucene-solr Key Features
lucene-solr Examples and Code Snippets
Community Discussions
Trending Discussions on lucene-solr
QUESTION
I'm removing stop words from a String, using Apache's Lucene (8.6.3) and the following Java 8 code:
...ANSWER
Answered 2020-Oct-13 at 12:31I will tackle this in two parts:
- stop-words
- preserving original case
Handling the Combined Stop Words
To handle the combination of Lucene's English stop word list, plus your own custom list, you can create a merged list as follows:
QUESTION
I have a flow
that starts with a poller
and hands off the message to several async
flows downstream using task-executors
to execute in parallel
for a given dataset. A downstream aggregator
completes the flow and notifies the poller that the flow
is complete.
I would like to track
every execution of the poller by using MDC
so that the logs
can be mapped to a particular execution of the flow
.
I started by adding MDC
to the poller thread (using Advice
), however with this approach there could be a couple of issues:
- How do I stamp the
MDC
on the executor thread when theasync
hand off happens? - Since executor uses a a
thread pool
, do I need to clear theMDC
before thethread
returns to the pool? Will there be any side effects?
Another approach would be to add MDC
to the Message
header and set it manually on the new thread
during the async
handoff. How to do that? For example, if I turn on the debug
logs, the MDC
should be stamped right from the beginning of the new thread
execution and not from the point where my logic starts in the service activator
.
How to set this on the task-executor
thread (and probably also remove before returning to the pool) using XML
configuration? Something like an MdcAwareThreadPoolExecutor
seen here.
Also, I would not want the MDC
logic to be spread across all the async
handoff endpoints, may be there is some generic way to configure it?
Is there a better way to achieve this? Any known solutions?
...ANSWER
Answered 2020-Sep-25 at 15:05I would like to track every execution of the poller by using MDC so that the logs can be mapped to a particular execution of the flow.
It is fully sound as "you would like to track the message journey in your flow". As you noticed there is the way to set some message header. So, why just don't map your logs by this specific header?
You can take a look into Message History pattern how to gather the whole path for the message, so then in logs you can track it back looking into message headers.
If you really still insist on the MDC, then you definitely need to take a look into some MDCDelegatingExecutorDecorator. Some sample you can borrow from Spring Security and its
DelegatingSecurityContextExecutor`: https://docs.spring.io/spring-security/site/docs/5.4.0/reference/html5/#concurrency
QUESTION
I need to move a solr core running on 5.5.3 to new server, where I installed solr 8.1.1. Unfortunately the exixsting schema.xml uses several instances of
...ANSWER
Answered 2019-Jul-06 at 14:53The StandardFilter hasn't done anything since 3.1, so you can safely remove it:
This filter is no longer operational in Solr when the
luceneMatchVersion
(insolrconfig.xml
) is higher than "3.1".
It should not affect anything, except if you've explicitly used a luceneMatchVersion
lower than 3.2.
Your stemmer probably does parts of what the Standard Filter did already - i.e. it removes plural 's.
If you still require some functionality from the old StandardFilter, you can drop the StandardTokenizer and use the Classic versions instead:
QUESTION
I'm using SolrCLoud is to search documents with multiple attributes. In my application, I would like to search over all the fields if the query does not specify any specific field such term1 AND term2
query should search for that combination in all the fields.
Reading the documentation looks like you can define a default fields for your search.
I have found examples of changing the default facets for search handler, but not for the default search fields but not for the default search fields on query handler.
Does anyone know how to use the Solr API to change the default fields in the QueryHandler?
...ANSWER
Answered 2018-May-11 at 12:51You can modify your default field and default operator configuration using Config API.
For example you can add it creating a new initParams
with:
QUESTION
I am using straight up Lucene (no Solr or ElasticSearch) to index a set of documents of which follow a parent-child hierarchy.
I am using 'blocks' to accomplish this by adding all children followed by the parent to the same block calling:
...ANSWER
Answered 2019-Jun-04 at 05:58I've ended up using the code below. And it seems to work:
QUESTION
I'm trying to automatically bootstrap a SolrCloud cluster. I've figured out how to upload my configuration files and my solr.xml file to zookeeper using
...ANSWER
Answered 2019-Apr-03 at 16:42No, it is not possible. You need Solr running, you hit this Collections api endpoint to create the collection. And this endpoint is served by Solr
This question was recently discussed on the solr-user mailing list and the conclusion was the same, you need to have Solr running in order to create a collection.
One suggestion to work around this limitation is to write a script that waits for the appropriate number of nodes to become available before calling the collections API endpoint to create the collection. An example python script is mentioned in the email thread that is capable of doing this.
QUESTION
I am setting up a new Solr server and I'm running into an issue I haven't experienced in previous Solr installations. When I navigate to a core's "Dataimport" tab (without even triggering an import request), several of the HTTP requests made by the admin UI fail. Checking the Solr logs, I see this stacktrace:
...ANSWER
Answered 2018-Sep-18 at 17:44Figured it out. There was nothing wrong with my Solr setup. Instead, it was a problem with the reverse proxy (IIS) sitting in front of Solr. The way I was proxying traffic to Solr was duplicating all of the query parameters.
Here's the question and answer that helped me fix the issue: IIS URL Rewrite module repeats query string.
QUESTION
I am running official Docker Hub Apache Solr 7.4 image inside GCP Kubernetes Engine.
IssueI need to upload JSON documents to the index. In the past I've only had experience uploading documents stored on the same machine that hosts Solr instance using bin/post
command or the Admin UI.
Now I need to upload quite a few JSON documents from my machine to the Solr instance in the Docker container (86 documents ~30MB each to be exact). Adding so much extra data to the image doesn't make sense. And JSON Formatted Index Updates docs page only provides two options:
- Uploading JSON docs located on the same machine as Solr instance or
- Specifying JSON document directly in the curl command
I tired adding the documents using commands that I would expect to work (note that I use localhost
here since I test the Docker image locally first, but the idea is the same):
ANSWER
Answered 2018-Sep-06 at 22:50Apparently Solr doesn't allow null
as a field value (it causes Solr to throw NullPointerException
). After changing null
in my example JSON file to a String, I was able to upload the files following the steps described in the question.
QUESTION
I'm trying to run solr as a SystemD service. When I start the service I get this warning then the solr server stops.
...ANSWER
Answered 2018-Jun-26 at 11:11According to this limit defined in /etc/security/limit.conf
dosen't work with systemD.
To define new limit in a systemD unit file add those line in the service section:
QUESTION
I just started to learn Solr, when I create the index on the "films" example, I got only 5 documents in Solr Admin which is of course wrong. Here are the steps from Steve Rowe that I followed:
...ANSWER
Answered 2018-Mar-30 at 07:03When you are doing the query q=batman
you mention no field to search against. Usual Solr syntax is field:value
. In your case I assume it should be q=name:batman
As additional information - when no field is specified, Solr picks up the default field from the configuration, but most likely in your case, it was the field that is not existing in the index.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install lucene-solr
Eclipse - Not tested.
Netbeans - Not tested.
./gradlew assemble will build a runnable Solr as noted above. ./gradlew check will assemble Lucene/Solr and run all validation tasks unit tests. ./gradlew help will print a list of help commands for high-level tasks. One of these is helpAnt that shows the gradle tasks corresponding to ant targets you may be familiar with.
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page