Skip to content

Instantly share code, notes, and snippets.

@asif31iqbal
Last active February 19, 2017 02:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save asif31iqbal/d29523b55ce093dbad69f5b12fe22387 to your computer and use it in GitHub Desktop.
Save asif31iqbal/d29523b55ce093dbad69f5b12fe22387 to your computer and use it in GitHub Desktop.
solr help
Analyzer
- Tokenizer
- Series of filters
StandardAnalyzer
- StandardTokenizer
- StandardFilter, LowercaseFilter, StopFilter
Stemming:
- Swimming -> Swim, catlike, cattly -> cat
- Create custom Analyzer, override createComponents()
- PorterStemFilter
TermQuery:
- Singe word only
- Just name of the field and the term. No wildcard etc.
NGramTokenizer:
- asifq, 3 -> asi, sif, ifq
TermRangeQuery:
- Range for terms (e.g. get all documents with terms x to y, lexical order)
NumericRangeQuery:
- like TermRangeQuery, but for numeric values.
PrefixQuery:
- Prefix search
PhraseQuery:
- Multiple words
- Specify words and distance between them
BooleanQuery:
- Search multiple fields
- AND, OR, NOT combinations. MUST, SHOULD etc can be specified.
QueryParser:
- Another way of querying instead of directly using lucene's api methods.
NGramTokenizer:
- Good for efficient embedded search (as opposed to inefficient wildcard queries).
In Solr, at times, there could be duplications between Tokenizers and Filters. Example: EdgeNGramTokenizerFactory and EdgeNGramFilterFactory.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment