[英]Indexing in Vespa is slow
在本地 Vespa 中索引时,索引速度很慢。
我的配置:`
<container id="default" version="1.0">
<search />
<document-api />
<nodes>
<node hostalias="node1" />
</nodes>
</container>
<content id="bo" version="1.0">
<redundancy>1</redundancy>
<documents>
<document type="psearch" mode="index" />
</documents>
<nodes>
<node hostalias="node1" distribution-key="0" />
</nodes>
</content>
`
和模式:
schema psearch {
document psearch {
field Id type int {
indexing: summary | attribute
attribute: fast-search
}
field Name type string {
indexing: summary | index | attribute
index: enable-bm25
}
field AdId type string {
indexing: summary | index | attribute
index: enable-bm25
}
field Country type string {
indexing: summary | index | attribute
index: enable-bm25
}
field Avatar type string {
indexing: summary | index | attribute
index: enable-bm25
}
field Value type long {
indexing: summary | attribute
attribute: fast-search
}
field Numbers type int {
indexing: summary | attribute
attribute: fast-search
}
field BotLastTime type long {
indexing: summary | attribute
attribute: fast-search
}
field BotDailyCount type int {
indexing: summary | attribute
attribute: fast-search
}
field Platform type string {
indexing: summary | index | attribute
index: enable-bm25
}
}
fieldset default {
fields: Id, Name, AdId, Country, Avatar, Numbers, BotLastTime, BotDailyCount, Platform
}
rank-profile default {
first-phase {
expression: nativeRank(Id, Name, AdId, Country, Avatar, Numbers, BotLastTime, BotDailyCount, Platform)
}
}
}
我使用 /document/v1 API 将文档推送到 Vespa(通过 ID POST 放置给定文档) https://docs.vespa.ai/en/reference/document-v1-api-reference.html
在我对本地 Vespa 的测试中,推送一个文档大约需要 2.3 毫秒,而在我推送 100k 文档的测试中。
我用弹性搜索做了同样的测试,平均时间约为 1.7 毫秒。 我正在尝试找到一种方法来获得至少与 ElasticSearch 相同的性能。
知道如何改善每次文档推送的时间吗?
您是否尝试使用https://docs.vespa.ai/en/vespa-feed-client.html - 这针对吞吐量进行了优化,通常是推送索引负载的最佳客户端。 在https://github.com/vespa-engine/vespa/issues/25715也有人问过这个问题,在那里找到了更多答案
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.