Beruflich Dokumente
Kultur Dokumente
cd $SOLR_INSTALL/realestate
java -jar start.jar
** cleaning up index :
remove the collection1/data/*
** Solr is a document storage and retrieval engine. Every piece of data submitte
d to
Solr for processing is a document. A document could be a newspaper article, a re
sume
or social profile, or, in an extreme case, an entire book.
Terms, phrases, and Boolean logic
==================================
AND -> wrox AND java
jquery wrox AND java ===> jquery OR (wrox AND java)
jquery (wrox AND java)
**/select/?q=wrox java&q.op=OR versus /select?q=wrox java&q.op=AND
Phrease : "wrox java" ==> one doc will return
(name:"Red Lobster" -state:California )AND price:[25 TO *]
**/select/?q=new house&q.op=OR versus /select?q=new house&q.op=AND
Fuzzy matching -> inexact matches
==================================
someone may want to search for any words that start with a particular prefix (kn
own as wildcard searching),
may want to find spelling variations within one or two characters (known as fuzz
y searching or edit distance searching),
may want to match two terms within some maximum distance of each other (known as
proximity searching).
WILDCARD SEARCHING
====================
Query:
Query:
Query:
Query:
**Leading wildcards :
engineer* will not be expensive
e* will be expensive
wildcard searching is that wildcards are only meant to work on individual search
terms, not on phrase searches
Works: softwar* eng?neering
Does not work: "softwar* eng?neering"
**FUZZY / EDIT - DISTANCE SEARCHING
===================================
*** PAGING
==========
Query 1
/select?q=*:*&sort=id&fl=id&
rows=5&
start=0
: will return 1 to 5
Query 2
/select?q=*:*&sort=id&fl=id&
rows=5&
start=5
:will return 6 to 10
*** Sorting results
===================
sort=someField desc, someOtherField asc
sort=score desc, date desc
sort=date desc, popularity desc, score desc
*Any field you wish to sort on must be marked as indexed=true
******************** FACET
Field faceting
===============
http://localhost:8983/solr/select?
q=*:*&echoParams=none&rows=0&facet=true&facet.field=name
http://localhost:8983/solr/select?
q=*:*&facet=true&facet.field=tags
Query faceting
==============
1. http://localhost:8983/solr/select?q=*:*&fq=price:[5 TO 25]
2. http://localhost:8983/solr/select?q=*:*&fq=price:[5 TO 25]&
fq=state:("New York" OR "Georgia" OR "South Carolina")
http://localhost:8983/solr/select?q=*:*&rows=0&facet=true&facet.query=price:[* T
O 5}&facet.query=price:[5 TO 10}&facet.query=price:[10 TO 20}&facet.query=price:
[20 TO 50}&facet.query=price:[50 TO *]
Range faceting
===============
http://localhost:8983/solr/select?q=*:*&facet=true&facet.range=price&facet.range
.start=0&facet.range.end=50&facet.range.gap=5
Applying filters to your facets
===============================
without filter
http://localhost:8983/solr/select?q=*:*&facet=true&facet.field=state&facet.field
=city&facet.query=price:[* TO 10}&facet.query=price:[10 TO 25}&facet.query=price
:[25 TO 50}&facet.query=price:[50 TO *]
with filer
http://localhost:8983/solr/select?q=*:*&facet=true&facet.mincount=1&facet.field=