/browse
/query
/select
/update
/update/csv
/update/json
/update/extract
---------------------------------------------------------------------------
Dsolr.solr.home
启动 java -Djetty.port=8080 -jar start.jar
停止 ctrl+c
solr.xml 定义一个或多个cores
solrconfig.xml 设置指定core
schema.xml 定义索引的字段类型
Element Description
<arr> Named,ordered array of objects
<lst> Names,ordered list of name/value pairs
<bool> Boolean value; true or false <bool>true</bool>
<str> String value <str>spellcheck</str>
<int> Integer value <int>512</int>
<long> Long value <long>1359936000000</long>
<float> Float value <float>3.14</float>
<double> Double value <double>3.1415926</double>
---------------------------------------------------------------------------
查询
http://localhost:8983/solr/collection1/select?q=*%3A*&wt=json
http://localhost:8983/solr/collection1/select?
q=*%3A*&
fq=manu%3Abelkin&
fq=manu%3ABelkin&
sort=price+desc&
fl=name%2Cprice&
df=solr&
wt=php&
start=0&rows=10
Request-Handler /select
q 查询关键字
fq 过滤Filter query(manu:Belkin)
sort 排序(price asc)
start,rows 默认从0开始,每页10条记录。
fl 指定返回哪些字段(name,price,features,score)
df 默认搜索字段Default search field
wt 输出类型Response writer type(xml,csv,json,php,python,ruby)
curl http://localhost:8983/solr/update --data-binary @books.xml -H 'Content-type:text/xml; charset=utf-8'
Add索引
<add>
<doc>
<field name="id">10000</field>
<field name="name">商品名称</field>
</doc>
</add>
Delete索引
<delete>
<id>1</id>
</delete>
Delete by query
<delete>
<query>name:bule</query>
</delte>
Atomic Update
<add>
<doc>
<field name="id">1</field>
<field update="set" name="favourites_count">12</field>
</doc>
</add>
Commit
<commit waitSearcher="true" softCommit="false" />
Optimize
<optimize waitSearcher="false" />
/query
/select
/update
/update/csv
/update/json
/update/extract
---------------------------------------------------------------------------
Dsolr.solr.home
启动 java -Djetty.port=8080 -jar start.jar
停止 ctrl+c
solr.xml 定义一个或多个cores
solrconfig.xml 设置指定core
schema.xml 定义索引的字段类型
Element Description
<arr> Named,ordered array of objects
<lst> Names,ordered list of name/value pairs
<bool> Boolean value; true or false <bool>true</bool>
<str> String value <str>spellcheck</str>
<int> Integer value <int>512</int>
<long> Long value <long>1359936000000</long>
<float> Float value <float>3.14</float>
<double> Double value <double>3.1415926</double>
---------------------------------------------------------------------------
查询
http://localhost:8983/solr/collection1/select?q=*%3A*&wt=json
http://localhost:8983/solr/collection1/select?
q=*%3A*&
fq=manu%3Abelkin&
fq=manu%3ABelkin&
sort=price+desc&
fl=name%2Cprice&
df=solr&
wt=php&
start=0&rows=10
Request-Handler /select
q 查询关键字
fq 过滤Filter query(manu:Belkin)
sort 排序(price asc)
start,rows 默认从0开始,每页10条记录。
fl 指定返回哪些字段(name,price,features,score)
df 默认搜索字段Default search field
wt 输出类型Response writer type(xml,csv,json,php,python,ruby)
curl http://localhost:8983/solr/update --data-binary @books.xml -H 'Content-type:text/xml; charset=utf-8'
Add索引
<add>
<doc>
<field name="id">10000</field>
<field name="name">商品名称</field>
</doc>
</add>
Delete索引
<delete>
<id>1</id>
</delete>
Delete by query
<delete>
<query>name:bule</query>
</delte>
Atomic Update
<add>
<doc>
<field name="id">1</field>
<field update="set" name="favourites_count">12</field>
</doc>
</add>
Commit
<commit waitSearcher="true" softCommit="false" />
Optimize
<optimize waitSearcher="false" />