当关键字包含符号时,sphinx搜索错误(sphinx search error when keyword contains symbol)
我试着在手稿表中搜索包含一些数据,如'100021 / hello','199900 / hello'等。
search -c /etc/sphinx/sphinx.conf 100021/hello
它显示索引错误,但是当我尝试搜索100021或hello时,它可以返回正确的结果。
search -c /etc/sphinx/sphinx.conf 100021 search -c /etc/sphinx/sphinx.conf hello
在搜索过程中,似乎狮身人面像无法识别'/'?
I try to search in the manuscript table contain some data like '100021/hello', '199900/hello' etc.
search -c /etc/sphinx/sphinx.conf 100021/hello
it shows index error, but when i try to search 100021 or hello,it can return right result.
search -c /etc/sphinx/sphinx.conf 100021 search -c /etc/sphinx/sphinx.conf hello
It seems sphinx can't recognize '/' in during searching?
原文:https://stackoverflow.com/questions/18524851
最满意答案
Groovy附带BenchmarkInterceptor :
Interceptor在调用之前和之后注册每个方法调用的时间戳。 时间戳存储在内部,可以通过
getCalls()
和
statistic()
API。
用法示例:
def proxy = ProxyMetaClass.getInstance(ArrayList.class) proxy.interceptor = new BenchmarkInterceptor() proxy.use { def list = (0..10000).collect{ it } 4.times { list.size() } 4000.times { list.set(it, it+1) } } proxy.interceptor.statistic()
其中产生以下输出:
[[size, 4, 0], [set, 4000, 21]]
Groovy ships with BenchmarkInterceptor:
Interceptor that registers the timestamp of each method call before and after invocation. The timestamps are stored internally and can be retrieved through the with the
getCalls()
and
statistic()
API.
Example usage:
def proxy = ProxyMetaClass.getInstance(ArrayList.class) proxy.interceptor = new BenchmarkInterceptor() proxy.use { def list = (0..10000).collect{ it } 4.times { list.size() } 4000.times { list.set(it, it+1) } } proxy.interceptor.statistic()
Which produces the following output:
[[size, 4, 0], [set, 4000, 21]]
相关问答
更多-
使用Calendar , Calendar cal=Calendar.getInstance();//it return same time as new Date() def hour = cal.get(Calendar.HOUR_OF_DAY) 有关详细信息,请阅读此文档 。 Use Calendar, Calendar cal=Calendar.getInstance();//it return same time as new Date() def hour = cal.get( ...
-
Groovy附带BenchmarkInterceptor : Interceptor在调用之前和之后注册每个方法调用的时间戳。 时间戳存储在内部,可以通过 getCalls() 和 statistic() API。 用法示例: def proxy = ProxyMetaClass.getInstance(ArrayList.class) proxy.interceptor = new BenchmarkInterceptor() proxy.use { def list = (0..10000) ...
-
解决方案是从~/Library/Preferences/
/options/ (OSX EI capitan)中删除dslActivationStatus.xml 这是intellij支持团队在调查几天后提出的。 The solution was to remove dslActivationStatus.xml from ~/Library/Preferences/ /options/ (OSX El capitan) This was su ... -
Groovy元类基于调用顺序添加多个方法而不是模拟(Groovy metaclass add multiple methods based on invocation order not mock)[2021-08-22]
实现它的一种方法是在类中使用内部标志。 然后根据标志调用不同的实现。 Sql.metaClass.first = true Sql.metaClass.call = {String sql, List params, Closure c -> if (first){ c(mockResultSet) first = false }else{ c(expectedLookupId) } } One way to implement it wo ... -
我认为你能做的最好的事情是写下这样的东西: def dumpOut( clz ) { clz.metaClass.methods.each { method -> println "${method.returnType.name} ${method.name}( ${method.parameterTypes*.name.join( ', ' )} )" } } dumpOut String.class 哪个会打印出来: boolean equals( java.lang.Objec ...
-
花在跳转指令上的时间(Time spent on jump instruction)[2023-04-18]
@ EOF的评论涵盖了主要原因。 CPU性能计数器可以跟踪分支错误预测,因此您可以查看该分支是否预测不佳。 使用Linux perf或Intel的Vtune,或其他任何可用的。 perf stat ./some-program # a quick summary, not broken down by insn perf record -e branch-misses ./some-program perf report # poke around at which instructions had ... -
Groovy编程(Groovy programming)[2022-06-04]
在这个问题中有一个很好的网站列表 - http://www.quora.com/Who-has-deployed-a-medium-large-website-succesfully-on-Groovy-Grails There is a good list of sites in this quora question - http://www.quora.com/Who-has-deployed-a-medium-large-website-succesfully-on-Groovy-Grails -
花在垃圾收集器上的时间(Get time spent in garbage collector)[2021-11-22]
对于热点jvm启动jvm与-XX:+PrintGCDetails它将开始记录gc事件,其中包括花费的时间 如果要将其重定向到文件 -Xloggc:/home/someuser/app/logs/jvm/gc.log -verbose:gc -XX:+PrintGCDateStamps -XX:+PrintGCDetails http://www.oracle.com/technetwork/java/javase/community/vmoptions-jsp-140102.html For hotspo ... -
好的,这是GetThreadTimes 。 在这种情况下,有趣的参数是UserTime,但如果你在函数中调用内核,我怀疑添加KernelTime并不是一个好主意,因为如果你的线程被中断,你总是可以得到一些不是真正属于你的东西。 如果MS声明这些时间是否更新了上下文切换(他们可能是但我想听到它),这也会很好。 Alright this is it GetThreadTimes. The interesting parameter is the UserTime in this case, although i ...
-
您的列表中没有元素。 逻辑上,如果列表为空,则every返回true(因为集合中的每个元素 - 所有0个 - 通过测试) assert [].every { it == 1 } == true There are no elements in your list. Logically every returns true if the list is empty (as every element in the collection -- all 0 of them -- passes the test) ...