You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Mar 28, 2019. It is now read-only.
docs = ['this is my test text to be highlighted','this is another test text to be highlighted'];
words = 'test text';
index = 'test';
opts = {'before_match':'', 'after_match':'', 'chunk_separator':' ... ', 'limit':400, 'around':15};
var cl = new SphinxClient();
cl.SetServer('localhost', 9312);
for (i=0;i<1000;i++) {
cl.BuildExcerpts (docs, index, words, opts, function(error, results) {
console.log(results)
})
}
real 0m31.281s
python:
from sphinxapi import *
import sys
docs = ['this is my test text to be highlighted','this is another test text to be highlighted']
words = 'test text'
index = 'test'
nodejs:
var SphinxClient = require('sphinxapi'),
docs = ['this is my test text to be highlighted','this is another test text to be highlighted'];
words = 'test text';
index = 'test';
opts = {'before_match':'', 'after_match':'', 'chunk_separator':' ... ', 'limit':400, 'around':15};
var cl = new SphinxClient();
cl.SetServer('localhost', 9312);
for (i=0;i<1000;i++) {
cl.BuildExcerpts (docs, index, words, opts, function(error, results) {
console.log(results)
})
}
real 0m31.281s
python:
from sphinxapi import *
import sys
docs = ['this is my test text to be highlighted','this is another test text to be highlighted']
words = 'test text'
index = 'test'
opts = {'before_match':'', 'after_match':'', 'chunk_separator':' ... ', 'limit':400, 'around':15}
i = 0
cl = SphinxClient()
cl.Open()
while i < 1000:
res = cl.BuildExcerpts(docs, index, words, opts)
print res
i = i + 1
print i
cl.Close()
real 0m0.854s
user 0m0.071s
sys 0m0.021s
Why ?
The text was updated successfully, but these errors were encountered: