kandi background
Explore Kits

lucene-solr | Apache Lucene and Solr opensource search software | Search Engine library

 by   apache Java Version: Current License: Apache-2.0

 by   apache Java Version: Current License: Apache-2.0

Download this library from

kandi X-RAY | lucene-solr Summary

lucene-solr is a Java library typically used in Database, Search Engine applications. lucene-solr has no bugs, it has no vulnerabilities, it has build file available, it has a Permissive License and it has medium support. You can download it from GitHub.
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
Support
Quality
Quality
Security
Security
License
License
Reuse
Reuse

kandi-support Support

  • lucene-solr has a medium active ecosystem.
  • It has 4097 star(s) with 2714 fork(s). There are 331 watchers for this library.
  • It had no major release in the last 12 months.
  • lucene-solr has no issues reported. There are 316 open pull requests and 0 closed requests.
  • It has a neutral sentiment in the developer community.
  • The latest version of lucene-solr is current.
lucene-solr Support
Best in #Search Engine
Average in #Search Engine
lucene-solr Support
Best in #Search Engine
Average in #Search Engine

quality kandi Quality

  • lucene-solr has no bugs reported.
lucene-solr Quality
Best in #Search Engine
Average in #Search Engine
lucene-solr Quality
Best in #Search Engine
Average in #Search Engine

securitySecurity

  • lucene-solr has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
lucene-solr Security
Best in #Search Engine
Average in #Search Engine
lucene-solr Security
Best in #Search Engine
Average in #Search Engine

license License

  • lucene-solr is licensed under the Apache-2.0 License. This license is Permissive.
  • Permissive licenses have the least restrictions, and you can use them in most projects.
lucene-solr License
Best in #Search Engine
Average in #Search Engine
lucene-solr License
Best in #Search Engine
Average in #Search Engine

buildReuse

  • lucene-solr releases are not available. You will need to build from source code and install.
  • Build file is available. You can build the component from source.
  • Installation instructions are available. Examples and code snippets are not available.
lucene-solr Reuse
Best in #Search Engine
Average in #Search Engine
lucene-solr Reuse
Best in #Search Engine
Average in #Search Engine
Top functions reviewed by kandi - BETA

Coming Soon for all Libraries!

Currently covering the most popular Java, JavaScript and Python libraries. See a SAMPLE HERE.
kandi's functional review helps you automatically verify the functionalities of the libraries and avoid rework.

lucene-solr Key Features

Apache Lucene and Solr open-source search software

Using default and custom stop words with Apache's Lucene (weird output)

copy iconCopydownload iconDownload
import org.apache.lucene.analysis.en.EnglishAnalyzer;

...

final List<String> stopWords = Arrays.asList("short", "test");
final CharArraySet stopSet = new CharArraySet(stopWords, true);

CharArraySet enStopSet = EnglishAnalyzer.ENGLISH_STOP_WORDS_SET;
stopSet.addAll(enStopSet);
[bla]
short
this
is
a
test
the
him
it
import org.apache.lucene.analysis.custom.CustomAnalyzer;

...

Analyzer analyzer = CustomAnalyzer.builder()
        .withTokenizer("icu")
        .addTokenFilter("stop",
                "ignoreCase", "true",
                "words", "stopwords.txt",
                "format", "wordset")
        .build();
[Bla]
    <build>  
        <resources>  
            <resource>  
                <directory>src/main/java</directory>  
                <excludes>  
                    <exclude>**/*.java</exclude>  
                </excludes>  
            </resource>  
        </resources>  
    </build> 
import java.nio.file.Path;
import java.nio.file.Paths;

...

Path resources = Paths.get("/path/to/resources/directory");

Analyzer analyzer = CustomAnalyzer.builder(resources)
        .withTokenizer("icu")
        .addTokenFilter("stop",
                "ignoreCase", "true",
                "words", "stopwords.txt",
                "format", "wordset")
        .build();
-----------------------
import org.apache.lucene.analysis.en.EnglishAnalyzer;

...

final List<String> stopWords = Arrays.asList("short", "test");
final CharArraySet stopSet = new CharArraySet(stopWords, true);

CharArraySet enStopSet = EnglishAnalyzer.ENGLISH_STOP_WORDS_SET;
stopSet.addAll(enStopSet);
[bla]
short
this
is
a
test
the
him
it
import org.apache.lucene.analysis.custom.CustomAnalyzer;

...

Analyzer analyzer = CustomAnalyzer.builder()
        .withTokenizer("icu")
        .addTokenFilter("stop",
                "ignoreCase", "true",
                "words", "stopwords.txt",
                "format", "wordset")
        .build();
[Bla]
    <build>  
        <resources>  
            <resource>  
                <directory>src/main/java</directory>  
                <excludes>  
                    <exclude>**/*.java</exclude>  
                </excludes>  
            </resource>  
        </resources>  
    </build> 
import java.nio.file.Path;
import java.nio.file.Paths;

...

Path resources = Paths.get("/path/to/resources/directory");

Analyzer analyzer = CustomAnalyzer.builder(resources)
        .withTokenizer("icu")
        .addTokenFilter("stop",
                "ignoreCase", "true",
                "words", "stopwords.txt",
                "format", "wordset")
        .build();
-----------------------
import org.apache.lucene.analysis.en.EnglishAnalyzer;

...

final List<String> stopWords = Arrays.asList("short", "test");
final CharArraySet stopSet = new CharArraySet(stopWords, true);

CharArraySet enStopSet = EnglishAnalyzer.ENGLISH_STOP_WORDS_SET;
stopSet.addAll(enStopSet);
[bla]
short
this
is
a
test
the
him
it
import org.apache.lucene.analysis.custom.CustomAnalyzer;

...

Analyzer analyzer = CustomAnalyzer.builder()
        .withTokenizer("icu")
        .addTokenFilter("stop",
                "ignoreCase", "true",
                "words", "stopwords.txt",
                "format", "wordset")
        .build();
[Bla]
    <build>  
        <resources>  
            <resource>  
                <directory>src/main/java</directory>  
                <excludes>  
                    <exclude>**/*.java</exclude>  
                </excludes>  
            </resource>  
        </resources>  
    </build> 
import java.nio.file.Path;
import java.nio.file.Paths;

...

Path resources = Paths.get("/path/to/resources/directory");

Analyzer analyzer = CustomAnalyzer.builder(resources)
        .withTokenizer("icu")
        .addTokenFilter("stop",
                "ignoreCase", "true",
                "words", "stopwords.txt",
                "format", "wordset")
        .build();
-----------------------
import org.apache.lucene.analysis.en.EnglishAnalyzer;

...

final List<String> stopWords = Arrays.asList("short", "test");
final CharArraySet stopSet = new CharArraySet(stopWords, true);

CharArraySet enStopSet = EnglishAnalyzer.ENGLISH_STOP_WORDS_SET;
stopSet.addAll(enStopSet);
[bla]
short
this
is
a
test
the
him
it
import org.apache.lucene.analysis.custom.CustomAnalyzer;

...

Analyzer analyzer = CustomAnalyzer.builder()
        .withTokenizer("icu")
        .addTokenFilter("stop",
                "ignoreCase", "true",
                "words", "stopwords.txt",
                "format", "wordset")
        .build();
[Bla]
    <build>  
        <resources>  
            <resource>  
                <directory>src/main/java</directory>  
                <excludes>  
                    <exclude>**/*.java</exclude>  
                </excludes>  
            </resource>  
        </resources>  
    </build> 
import java.nio.file.Path;
import java.nio.file.Paths;

...

Path resources = Paths.get("/path/to/resources/directory");

Analyzer analyzer = CustomAnalyzer.builder(resources)
        .withTokenizer("icu")
        .addTokenFilter("stop",
                "ignoreCase", "true",
                "words", "stopwords.txt",
                "format", "wordset")
        .build();
-----------------------
import org.apache.lucene.analysis.en.EnglishAnalyzer;

...

final List<String> stopWords = Arrays.asList("short", "test");
final CharArraySet stopSet = new CharArraySet(stopWords, true);

CharArraySet enStopSet = EnglishAnalyzer.ENGLISH_STOP_WORDS_SET;
stopSet.addAll(enStopSet);
[bla]
short
this
is
a
test
the
him
it
import org.apache.lucene.analysis.custom.CustomAnalyzer;

...

Analyzer analyzer = CustomAnalyzer.builder()
        .withTokenizer("icu")
        .addTokenFilter("stop",
                "ignoreCase", "true",
                "words", "stopwords.txt",
                "format", "wordset")
        .build();
[Bla]
    <build>  
        <resources>  
            <resource>  
                <directory>src/main/java</directory>  
                <excludes>  
                    <exclude>**/*.java</exclude>  
                </excludes>  
            </resource>  
        </resources>  
    </build> 
import java.nio.file.Path;
import java.nio.file.Paths;

...

Path resources = Paths.get("/path/to/resources/directory");

Analyzer analyzer = CustomAnalyzer.builder(resources)
        .withTokenizer("icu")
        .addTokenFilter("stop",
                "ignoreCase", "true",
                "words", "stopwords.txt",
                "format", "wordset")
        .build();
-----------------------
import org.apache.lucene.analysis.en.EnglishAnalyzer;

...

final List<String> stopWords = Arrays.asList("short", "test");
final CharArraySet stopSet = new CharArraySet(stopWords, true);

CharArraySet enStopSet = EnglishAnalyzer.ENGLISH_STOP_WORDS_SET;
stopSet.addAll(enStopSet);
[bla]
short
this
is
a
test
the
him
it
import org.apache.lucene.analysis.custom.CustomAnalyzer;

...

Analyzer analyzer = CustomAnalyzer.builder()
        .withTokenizer("icu")
        .addTokenFilter("stop",
                "ignoreCase", "true",
                "words", "stopwords.txt",
                "format", "wordset")
        .build();
[Bla]
    <build>  
        <resources>  
            <resource>  
                <directory>src/main/java</directory>  
                <excludes>  
                    <exclude>**/*.java</exclude>  
                </excludes>  
            </resource>  
        </resources>  
    </build> 
import java.nio.file.Path;
import java.nio.file.Paths;

...

Path resources = Paths.get("/path/to/resources/directory");

Analyzer analyzer = CustomAnalyzer.builder(resources)
        .withTokenizer("icu")
        .addTokenFilter("stop",
                "ignoreCase", "true",
                "words", "stopwords.txt",
                "format", "wordset")
        .build();
-----------------------
import org.apache.lucene.analysis.en.EnglishAnalyzer;

...

final List<String> stopWords = Arrays.asList("short", "test");
final CharArraySet stopSet = new CharArraySet(stopWords, true);

CharArraySet enStopSet = EnglishAnalyzer.ENGLISH_STOP_WORDS_SET;
stopSet.addAll(enStopSet);
[bla]
short
this
is
a
test
the
him
it
import org.apache.lucene.analysis.custom.CustomAnalyzer;

...

Analyzer analyzer = CustomAnalyzer.builder()
        .withTokenizer("icu")
        .addTokenFilter("stop",
                "ignoreCase", "true",
                "words", "stopwords.txt",
                "format", "wordset")
        .build();
[Bla]
    <build>  
        <resources>  
            <resource>  
                <directory>src/main/java</directory>  
                <excludes>  
                    <exclude>**/*.java</exclude>  
                </excludes>  
            </resource>  
        </resources>  
    </build> 
import java.nio.file.Path;
import java.nio.file.Paths;

...

Path resources = Paths.get("/path/to/resources/directory");

Analyzer analyzer = CustomAnalyzer.builder(resources)
        .withTokenizer("icu")
        .addTokenFilter("stop",
                "ignoreCase", "true",
                "words", "stopwords.txt",
                "format", "wordset")
        .build();

Upgrade filter in schema.xml with solr.StandardFilterFactory from existing core on new server

copy iconCopydownload iconDownload
<tokenizer class="solr.ClassicTokenizerFactory"/>
<filter class="solr.ClassicFilterFactory"/>

Change default query fields in SolrCloud using the API

copy iconCopydownload iconDownload
curl http://localhost:8983/solr/films/config -H 'Content-type:application/json' -d '{
      "add-initparams" : { name : "my-init", "path" : "/select,/browse", 
           "defaults":{ "df":"term1 term2" ,"q.op":"AND" }
      } }'
<initParams path="/select,/get,standard">
   <lst name="defaults">
      <str name="df">term1 term2</str>
      <str name="q.op">AND</str>
   </lst>
</initParams>
-----------------------
curl http://localhost:8983/solr/films/config -H 'Content-type:application/json' -d '{
      "add-initparams" : { name : "my-init", "path" : "/select,/browse", 
           "defaults":{ "df":"term1 term2" ,"q.op":"AND" }
      } }'
<initParams path="/select,/get,standard">
   <lst name="defaults">
      <str name="df">term1 term2</str>
      <str name="q.op">AND</str>
   </lst>
</initParams>
-----------------------
Map<String, String> props= new HashMap<>();
props.put("solr.autoCommit.maxTime", 10000);
props.put("solr.autoSoftCommit.maxTime", 15000);

StringBuilder command = new StringBuilder("{\"set-property\": {");
   for (Map.Entry<String, String> entry: props.entrySet())
   {
      command.append('"').append(entry.getKey()).append('"').append(':');
      command.append(entry.getValue()).append(',');
   }
   command.setLength(command.length()-1); // remove last comma
   command.append("}}");

   GenericSolrRequest rq = new GenericSolrRequest(SolrRequest.METHOD.POST, "/config", null);
   ContentStream content = new ContentStreamBase.StringStream(command.toString());
   rq.setContentStreams(Collections.singleton(content));
   rq.process(solrClient);

Lucene - how to get all child docs in a parent's block given a parent docID

copy iconCopydownload iconDownload
private List<Integer> getChildDocIds(IndexSearcher indexSearcher, int parentDocId) throws IOException {
    //Use a query in QueryBitSetProducer constructor which identifies parent docs
    BitSetProducer parentsFilter = new QueryBitSetProducer(new TermQuery(new Term("child", "N")));
    IndexReader indexReader = indexSearcher.getIndexReader();
    List<LeafReaderContext> leaves = indexReader.leaves();
    int subIndex = ReaderUtil.subIndex(parentDocId, leaves);
    LeafReaderContext leaf = leaves.get(subIndex);
    int localParentDocId = parentDocId - leaf.docBase;
    List<Integer> childDocs = new ArrayList<>();
    if (localParentDocId == 0) { 
        //not a parent, or parent has no children
        return childDocs;
    }
    int prevParent = parentsFilter.getBitSet(leaf).prevSetBit(localParentDocId - 1);
    for(int childDocIndex = prevParent + 1; childDocIndex < localParentDocId; childDocIndex++) {
        childDocs.add(leaf.docBase + childDocIndex);
    }
    return childDocs;
}

Running Solr with SystemD: user limitations (ulimit) applied at runtime different from the configured limitations

copy iconCopydownload iconDownload
LimitNOFILE=65000
LimitNPROC=65000

Can not apply patch LUCENE-2899.patch to SOLR on Windows

copy iconCopydownload iconDownload
solr-8.0.0-3304 find . -name '*nlp*'
[...]
./contrib/langid/lib/opennlp-tools-1.8.3.jar
./contrib/analysis-extras/lib/opennlp-maxent-3.0.3.jar
./contrib/analysis-extras/lib/opennlp-tools-1.8.3.jar
./contrib/analysis-extras/lucene-libs/lucene-analyzers-opennlp-8.0.0-3304.jar
<lib dir="../../../contrib/analysis-extras/lib/" regex="opennlp-.*\.jar" />
<lib dir="../../../contrib/analysis-extras/lucene-libs/lucene-analyzers-opennlp-.*\.jar" regex=".*\.jar" />
-----------------------
solr-8.0.0-3304 find . -name '*nlp*'
[...]
./contrib/langid/lib/opennlp-tools-1.8.3.jar
./contrib/analysis-extras/lib/opennlp-maxent-3.0.3.jar
./contrib/analysis-extras/lib/opennlp-tools-1.8.3.jar
./contrib/analysis-extras/lucene-libs/lucene-analyzers-opennlp-8.0.0-3304.jar
<lib dir="../../../contrib/analysis-extras/lib/" regex="opennlp-.*\.jar" />
<lib dir="../../../contrib/analysis-extras/lucene-libs/lucene-analyzers-opennlp-.*\.jar" regex=".*\.jar" />

got error when run ant for lucene source code

copy iconCopydownload iconDownload
brew install ant@1.9
brew unlink ant
brew link --force ant@1.9
-----------------------
brew install ant@1.9
brew unlink ant
brew link --force ant@1.9

Why does Solr ClientUtils::escapeQueryChars escape spaces

copy iconCopydownload iconDownload
http://localhost:8983/solr/buybox/select?q=tv_display:Full HD
http://localhost:8983/solr/buybox/select?q=tv_display:Full\ HD
-----------------------
http://localhost:8983/solr/buybox/select?q=tv_display:Full HD
http://localhost:8983/solr/buybox/select?q=tv_display:Full\ HD

What is meant by +x in the expression ${GC_TUNE+x}

copy iconCopydownload iconDownload
#!/bin/bash
echo begin
unset foo
echo ${foo+bar} # unset, so this expands to nothing
foo=baz
echo ${foo+bar} # is set, so it expands to the value of the variable
echo end
begin

baz
end
-----------------------
#!/bin/bash
echo begin
unset foo
echo ${foo+bar} # unset, so this expands to nothing
foo=baz
echo ${foo+bar} # is set, so it expands to the value of the variable
echo end
begin

baz
end

Parsing simple query syntax

copy iconCopydownload iconDownload
(?:\S*"(?:[^"]+)"|\S+)
-----------------------
def testMatcher(query: String): Unit = {
  def optionalPrefix(groupName: String) = s"(?:(?:(?<$groupName>[a-zA-Z]+)[:])?)"
  val quoted = optionalPrefix("prefixQuoted") + "\"(?<textQuoted>[^\"]*)\""
  val unquoted = optionalPrefix("prefixUnquoted") + "(?<textUnquoted>[^\\s\"]+)"
  val regex = quoted + "|" + unquoted
  val matcher = regex.r.pattern.matcher(query)
  var results: List[QueryTerm] = Nil
  while (matcher.find()) {
    val quotedResult = Option(matcher.group("textQuoted")).map(textQuoted =>
      (Option(matcher.group("prefixQuoted")),textQuoted)
    )
    val unquotedResult = Option(matcher.group("textUnquoted")).map(textUnquoted =>
      (Option(matcher.group("prefixUnquoted")),textUnquoted)
    )
    val anyResult = quotedResult.orElse(unquotedResult).get
    results = QueryTerm(anyResult._1,anyResult._2) :: results
  }
  println(s"results=${results.mkString("\n")}")
}

Community Discussions

Trending Discussions on lucene-solr
  • Using default and custom stop words with Apache's Lucene (weird output)
  • Spring Integration MDC for Async Flow and Task Executors
  • Upgrade filter in schema.xml with solr.StandardFilterFactory from existing core on new server
  • Change default query fields in SolrCloud using the API
  • Lucene - how to get all child docs in a parent's block given a parent docID
  • How do I create a collection without a running Solr?
  • "ArrayList cannot be cast to java.lang.String" error message on Solr DIH endpoints
  • Ways to upload external data files to Apache Solr
  • Running Solr with SystemD: user limitations (ulimit) applied at runtime different from the configured limitations
  • Solr: indexing on the example films doesn't return any result
Trending Discussions on lucene-solr

QUESTION

Using default and custom stop words with Apache's Lucene (weird output)

Asked 2020-Oct-13 at 12:31

I'm removing stop words from a String, using Apache's Lucene (8.6.3) and the following Java 8 code:

private static final String CONTENTS = "contents";
final String text = "This is a short test! Bla!";
final List<String> stopWords = Arrays.asList("short","test");
final CharArraySet stopSet = new CharArraySet(stopWords, true);

try {
    Analyzer analyzer = new StandardAnalyzer(stopSet);
    TokenStream tokenStream = analyzer.tokenStream(CONTENTS, new StringReader(text));
    CharTermAttribute term = tokenStream.addAttribute(CharTermAttribute.class);
    tokenStream.reset();

    while(tokenStream.incrementToken()) {
        System.out.print("[" + term.toString() + "] ");
    }

    tokenStream.close();
    analyzer.close();
} catch (IOException e) {
    System.out.println("Exception:\n");
    e.printStackTrace();
}

This outputs the desired result:

[this] [is] [a] [bla]

Now I want to use both the default English stop set, which should also remove "this", "is" and "a" (according to github) AND the custom stop set above (the actual one I'm going to use is a lot longer), so I tried this:

Analyzer analyzer = new EnglishAnalyzer(stopSet);

The output is:

[thi] [is] [a] [bla]

Yes, the "s" in "this" is missing. What's causing this? It also didn't use the default stop set.

The following changes remove both the default and the custom stop words:

Analyzer analyzer = new EnglishAnalyzer();
TokenStream tokenStream = analyzer.tokenStream(CONTENTS, new StringReader(text));
tokenStream = new StopFilter(tokenStream, stopSet);

Question: What is the "right" way to do this? Is using the tokenStream within itself (see code above) going to cause problems?

Bonus question: How do I output the remaining words with the right upper/lower case, hence what they use in the original text?

ANSWER

Answered 2020-Oct-13 at 12:31

I 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:

import org.apache.lucene.analysis.en.EnglishAnalyzer;

...

final List<String> stopWords = Arrays.asList("short", "test");
final CharArraySet stopSet = new CharArraySet(stopWords, true);

CharArraySet enStopSet = EnglishAnalyzer.ENGLISH_STOP_WORDS_SET;
stopSet.addAll(enStopSet);

The above code simply takes the English stopwords bundled with Lucene and merges then with your list.

That gives the following output:

[bla]

Handling Word Case

This is a bit more involved. As you have noticed, the StandardAnalyzer includes a step in which all words are converted to lower case - so we can't use that.

Also, if you want to maintain your own custom list of stop words, and if that list is of any size, I would recommend storing it in its own text file, rather than embedding the list into your code.

So, let's assume you have a file called stopwords.txt. In this file, there will be one word per line - and the file will already contain the merged list of your custom stop words and the official list of English stop words.

You will need to prepare this file manually yourself (i.e. ignore the notes in part 1 of this answer).

My test file is just this:

short
this
is
a
test
the
him
it

I also prefer to use the CustomAnalyzer for something like this, as it lets me build an analyzer very simply.

import org.apache.lucene.analysis.custom.CustomAnalyzer;

...

Analyzer analyzer = CustomAnalyzer.builder()
        .withTokenizer("icu")
        .addTokenFilter("stop",
                "ignoreCase", "true",
                "words", "stopwords.txt",
                "format", "wordset")
        .build();

This does the following:

  1. It uses the "icu" tokenizer org.apache.lucene.analysis.icu.segmentation.ICUTokenizer, which takes care of tokenizing on Unicode whitespace, and handling punctuation.

  2. It applies the stopword list. Note the use of true for the ignoreCase attribute, and the reference to the stop-word file. The format of wordset means "one word per line" (there are other formats, also).

The key here is that there is nothing in the above chain which changes word case.

So, now, using this new analyzer, the output is as follows:

[Bla]

Final Notes

Where do you put the stop list file? By default, Lucene expects to find it on the classpath of your application. So, for example, you can put it in the default package.

But remember that the file needs to be handled by your build process, so that it ends up alongside the application's class files (not left behind with the source code).

I mostly use Maven - and therefore I have this in my POM to ensure the ".txt" file gets deployed as needed:

    <build>  
        <resources>  
            <resource>  
                <directory>src/main/java</directory>  
                <excludes>  
                    <exclude>**/*.java</exclude>  
                </excludes>  
            </resource>  
        </resources>  
    </build> 

This tells Maven to copy files (except Java source files) to the build target - thus ensuring the text file gets copied.

Final note - I did not investigate why you were getting that truncated [thi] token. If I get a chance I will take a closer look.


Follow-Up Questions

After combining I have to use the StandardAnalyzer, right?

Yes, that is correct. the notes I provided in part 1 of the answer relate directly to the code in your question, and to the StandardAnalyzer you use.

I want to keep the stop word file on a specific non-imported path - how to do that?

You can tell the CustomAnalyzer to look in a "resources" directory for the stop-words file. That directory can be anywhere on the file system (for easy maintenance, as you noted):

import java.nio.file.Path;
import java.nio.file.Paths;

...

Path resources = Paths.get("/path/to/resources/directory");

Analyzer analyzer = CustomAnalyzer.builder(resources)
        .withTokenizer("icu")
        .addTokenFilter("stop",
                "ignoreCase", "true",
                "words", "stopwords.txt",
                "format", "wordset")
        .build();

Instead of using .builder() we now use .builder(resources).

Source https://stackoverflow.com/questions/64321901

Community Discussions, Code Snippets contain sources that include Stack Exchange Network

Vulnerabilities

No vulnerabilities reported

Install lucene-solr

IntelliJ - IntelliJ idea can import the project out of the box. Code formatting conventions should be manually adjusted.
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

This README file only contains basic setup instructions. For more comprehensive documentation, visit:.

DOWNLOAD this Library from

Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from
over 430 million Knowledge Items
Find more libraries
Reuse Solution Kits and Libraries Curated by Popular Use Cases

Save this library and start creating your kit

Explore Related Topics

Share this Page

share link
Consider Popular Search Engine Libraries
Compare Search Engine Libraries with Highest Support
Compare Search Engine Libraries with Highest Security
Compare Search Engine Libraries with Highest Reuse
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from
over 430 million Knowledge Items
Find more libraries
Reuse Solution Kits and Libraries Curated by Popular Use Cases

Save this library and start creating your kit

  • © 2022 Open Weaver Inc.