search-engine

Which datatype and methods should I use?

依然范特西╮ 提交于 2019-12-02 07:31:27
I am trying to write a kind of simple search engine. I have a determined number of main subjects that are associated with specific keywords. The aim is to recognize the main subject from an input partial keyword. I am thinking of using a : Dictionary<string, List<string>> . I'll have to search in this dictionary and find, e.g., all keywords beginning with a 3 characters string and their main subject which is associated. Is my solution the best one ? And how can I efficiently look through those data without having to check manually every List , string by string . Let my know if I'am not clear.

Solr/Lucene fuzzy search too slow

给你一囗甜甜゛ 提交于 2019-12-02 07:20:32
I am trying to implement location(cities, regions, countries, objects) fuzzy search using Solr server. Currently, my index contains about 0.8-1.0 M items. It works really well using fuzzy search (~0.7) but is too slow for me (0.2-0.6 sec very often). The tokenizer that is used is <tokenizer class="solr.StandardTokenizerFactory"/> . As an alternative I tried <tokenizer class="solr.WhitespaceTokenizerFactory"/> - it is great in terms of performance (about 100x faster) but it does not offer fuzzy search:( Do you know any different approach I could use? I would like to benefit using fuzzy search

AttributeError: 'ElasticSearch' object has no attribute 'bulk_index'\"

雨燕双飞 提交于 2019-12-02 04:55:08
When I try python manage.py rebuild_index , error occur: self.conn.bulk_index(self.index_name, 'modelresult', prepped_docs, id_field=ID) AttributeError: 'ElasticSearch' object has no attribute 'bulk_index' I found the link https://github.com/toastdriven/pyelasticsearch/blob/master/pyelasticsearch.py#L424-469 with pyelasticsearch.py, and I dont know which edition it is. Anyway there is bulk_index in that code, buy my pyelasticsearch.py is not. Anyone has the same experience? thanks for ur time. Plus: django-haystack 2.0.0.beta, pyelasticsearch 0.0.6 Django-haystack will NOT work with original

Displaying sample text from the Lucene Search Results

ぐ巨炮叔叔 提交于 2019-12-02 04:23:33
Currently, I am using Lucene version 3.0.2 to create a search application that is similar to a dictionary. One of the objects that I want to display is a sort of "example", where Lucene would look for a word in a book and then the sentences where the words were used are displayed. I've been reading the Lucene in Action book and it mentions something like this, but looking through it I can't find other mentions. Is this something you can do with Lucene? If it is, how is can you do it? I believe what you are looking for is a Highlighter. One possibility is to use the lucene.search.highlight

Look for unique ID pattern which easy indexed by search engines

筅森魡賤 提交于 2019-12-02 02:34:52
问题 Like from Microsoft - "KB2756872" or from National Vulnerability Database - "CVE-2010-1428" or from Red Hat - "RHSA-2010:0376" or from OIDs - "1.3.6.1.4.1.311" or from UUID/GUID - "550e8400-e29b-41d4-a716-446655440000" . I want to put several jobs to UIDs. See next... I develop blog software and have idea to put unique ID in body of each post so can easily identify that copy from local storage is correspond to remote published copy. Also I want to post to many different blogging services so

Will changing file extension affect SE rankings?

爷,独闯天下 提交于 2019-12-01 23:34:11
问题 I'm updating a site and changing the pages from .html to .asp the pages will have the exact same name as the old html pages the only difference will be the file extension. Will this affect existing SE rankings? is there a solution? I'm on a Microsoft server no Apache for me here. Thanks in advance 回答1: Yes, because a new extension makes the URL a new URL. All links and rankings your current page has will be lost. No, because you can do a 301 redirect from the old URL to the URL will tells the

Lucene: How to perform search on several independent index sets and merge the result?

China☆狼群 提交于 2019-12-01 12:43:30
Now I have several Lucene index sets (I call it shards), which indexes different document sets. They are independent, which means I can perform search on each of them without reading others. Then I get a query request. I want to search it over every index set and combine the result to form the final top documents. I know that when scoring the documents, Lucene needs to know the < idf > of every term, and different index sets will give different < idf > to the same term (because different index sets hold different document sets). Thus to my understanding, I cannot compare the document score

Lucene: How to perform search on several independent index sets and merge the result?

独自空忆成欢 提交于 2019-12-01 11:30:58
问题 Now I have several Lucene index sets (I call it shards), which indexes different document sets. They are independent, which means I can perform search on each of them without reading others. Then I get a query request. I want to search it over every index set and combine the result to form the final top documents. I know that when scoring the documents, Lucene needs to know the < idf > of every term, and different index sets will give different < idf > to the same term (because different

Search values from first column in html table using JS?

回眸只為那壹抹淺笑 提交于 2019-12-01 09:05:06
I have this table <th>Example No.</th> <th>Column 1</th> <tr> <td id="SampleId">3512376894</td> <td>two.test2@hotmail.com</td> </tr> I have script that search the values by all columns. But all I want to do is search the values by first column only with td id. But I don't know how to do that. Please kindly, help me to do that? Thanks! Here's the jsfiddle file Here's the JScript: function doSearch() { var searchText = document.getElementById('searchTerm').value; var targetTable = document.getElementById('dataTable'); var targetTableColCount; for (var rowIndex = 0; rowIndex < targetTable.rows

Search values from first column in html table using JS?

我们两清 提交于 2019-12-01 05:56:30
问题 I have this table <th>Example No.</th> <th>Column 1</th> <tr> <td id="SampleId">3512376894</td> <td>two.test2@hotmail.com</td> </tr> I have script that search the values by all columns. But all I want to do is search the values by first column only with td id. But I don't know how to do that. Please kindly, help me to do that? Thanks! Here's the jsfiddle file Here's the JScript: function doSearch() { var searchText = document.getElementById('searchTerm').value; var targetTable = document