solr配数据库介绍
来源:互联网 发布:vb as boolean 编辑:程序博客网 时间:2024/04/29 02:45
1
2
3
4
5
<
requestHandler
name
=
"/dataimport"
class
=
"org.apache.solr.handler.dataimport.DataImportHandler"
>
<
lst
name
=
"defaults"
>
<
str
name
=
"config"
>data-config.xml</
str
>
</
lst
>
</
requestHandler
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
<
dataConfig
>
<
dataSource
type
=
"JdbcDataSource"
driver
=
"com.mysql.jdbc.Driver"
url
=
"jdbc:mysql://172.0.0.1:3306/cmntadmin"
user
=
"root"
password
=
""
/>
<
document
name
=
"content"
>
<
entity
name
=
"node"
query
=
"select id,username,creator from forbiduser"
>
<
field
column
=
"id"
name
=
"id"
/>
<
field
column
=
"username"
name
=
"name"
/>
<
field
column
=
"creator"
name
=
"contents"
/>
</
entity
>
</
document
>
</
dataConfig
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
<?
xml
version
=
"1.0"
encoding
=
"UTF-8"
?>
<
schema
name
=
"example"
version
=
"1.5"
>
<
fields
>
<!-- If you remove this field, you must _also_ disable the update log in solrconfig.xml
or Solr won't start. _version_ and update log are required for SolrCloud
-->
<
field
name
=
"_version_"
type
=
"long"
indexed
=
"true"
stored
=
"true"
/>
<!-- points to the root document of a block of nested documents. Required for nested
document support, may be removed otherwise
-->
<
field
name
=
"_root_"
type
=
"string"
indexed
=
"true"
stored
=
"false"
/>
<
field
name
=
"id"
type
=
"string"
indexed
=
"true"
stored
=
"true"
required
=
"true"
multiValued
=
"false"
/>
<
field
name
=
"name"
type
=
"text_general"
indexed
=
"true"
stored
=
"true"
/>
<
field
name
=
"contents"
type
=
"text_ik"
indexed
=
"true"
stored
=
"true"
/>
</
fields
>
<!-- Field to use to determine and enforce document uniqueness.
Unless this field is marked with required="false", it will be a required field
-->
<
uniqueKey
>id</
uniqueKey
>
<!-- DEPRECATED: The defaultSearchField is consulted by various query parsers when
parsing a query string that isn't explicit about the field. Machine (non-user)
generated queries are best made explicit, or they can use the "df" request parameter
which takes precedence over this.
Note: Un-commenting defaultSearchField will be insufficient if your request handler
in solrconfig.xml defines "df", which takes precedence. That would need to be removed.-->
<
defaultSearchField
>contents</
defaultSearchField
>
<
copyField
source
=
"name"
dest
=
"contents"
/>
<
solrQueryParser
defaultOperator
=
"OR"
/>
<
types
>
<
fieldType
name
=
"string"
class
=
"solr.StrField"
sortMissingLast
=
"true"
/>
<
fieldType
name
=
"long"
class
=
"solr.TrieLongField"
precisionStep
=
"0"
positionIncrementGap
=
"0"
/>
<
fieldType
name
=
"text_general"
class
=
"solr.TextField"
positionIncrementGap
=
"100"
>
<
analyzer
type
=
"index"
>
<
tokenizer
class
=
"solr.StandardTokenizerFactory"
/>
<
filter
class
=
"solr.StopFilterFactory"
ignoreCase
=
"true"
words
=
"stopwords.txt"
/>
<!-- in this example, we will only use synonyms at query time
<filter class="solr.SynonymFilterFactory" synonyms="index_synonyms.txt" ignoreCase="true" expand="false"/>
-->
<
filter
class
=
"solr.LowerCaseFilterFactory"
/>
</
analyzer
>
<
analyzer
type
=
"query"
>
<
tokenizer
class
=
"solr.StandardTokenizerFactory"
/>
<
filter
class
=
"solr.StopFilterFactory"
ignoreCase
=
"true"
words
=
"stopwords.txt"
/>
<
filter
class
=
"solr.SynonymFilterFactory"
synonyms
=
"synonyms.txt"
ignoreCase
=
"true"
expand
=
"true"
/>
<
filter
class
=
"solr.LowerCaseFilterFactory"
/>
</
analyzer
>
</
fieldType
>
<
fieldType
name
=
"text_ik"
class
=
"solr.TextField"
>
<
analyzer
class
=
"org.wltea.analyzer.lucene.IKAnalyzer"
/>
</
fieldType
>
</
types
>
</
schema
>
0 0
- solr配数据库介绍
- 【solr】solr介绍
- Solr介绍
- Solr介绍
- solr介绍
- solr 数据库
- 【Solr】 Solr集群概念介绍
- solr 使用安装介绍
- Apache Solr 介绍
- Solr 使用入门介绍
- Solr全文检索介绍
- solr的界面介绍
- 第一章:介绍Solr
- solr入门介绍
- solr简单介绍
- Solr-1-介绍
- Solr缓存介绍
- Solr搜索介绍(Searching)
- Android每个Activity键盘状态设置 android:windowSoftInputMode
- 集成电路的基本知识
- 有序递增链表转化为平衡的二叉搜索树(LeetCode: Convert Sorted List to Binary Search Tree )
- javaweb:判断当前请求是否为移动设备访问
- 初探Linux网络协议栈
- solr配数据库介绍
- DataStructure-插入排序
- Windows Socket 1.1库函数大全
- java解析Excel
- 六角填数
- 支付宝SDK---openssl rsa.h file not found
- ByteBuffer的mark、position、limit、flip、reset,get方法介绍
- DownloadManager使用
- VC++6.0环境下用ODBC连接SQL Server数据库的简单例子