full-text-search

Full text search does not work if stop word is included even though stop word list is empty

孤街醉人 提交于 2021-01-29 12:49:24
问题 I would like to be able to search every word so I have cleared the stop word list. Than I have rebuilt the index. But unfortunately if I type in a search expression with stop word in it it still returns no row. If I leave out just the stop word I do get the results. E.g. "double wear stay in place" - no result, "double wear stay place" - I get the results that actually contain "in" as well. Does anyone know why this can be? I am using SQL Server 2012 Express. Thanks a lot! 回答1: Meanwhile I

What is the best way to implement simple text search

不问归期 提交于 2021-01-29 05:30:51
问题 Currently, I have a firestore database set up with a users collection and a funkoPops collection. The funkoPops collections has about 750 documents which are genres/series of funko pops. So an example of one document would be, document.id = "2014 Funko Pop Marvel Thor Series 2 Vinyl Figures" and that document has fields of funkoData, and genre. funkoData is an array of objects that are the funko pops that are within that 2014 series as you can see here. What is the best way to query for say

Firestore text search containing keyword Flutter

我只是一个虾纸丫 提交于 2021-01-29 05:24:55
问题 i was planning to have a full text search feature for the String name field of my document, but from the research i have done , it seems like searching text with firestore is not possible, then i come up with solution which is creating a new array field to store keyword in document, like this and then i called it using arracVontains, with searchedKeyword as the inputted text from user _firestore .collection(itemOrderPath) .where("keyword", arrayContains:searchedKeyword) Now, i'm quite

Alternative MySQL fulltext search syntax

*爱你&永不变心* 提交于 2021-01-29 04:11:22
问题 If you want the relevance and also the results to be sorted by relevance the common format of a FULLTEXT query is: SELECT name, MATCH(name) AGAINST('Bob') AS relevance FROM users WHERE MATCH(name) AGAINST('Bob') As a developer I always like to make my code DRY(don't repeat yourself). Is there any reason not to write the query as: SELECT name, MATCH(name) AGAINST('Bob') AS relevance FROM users HAVING relevance > 0 ORDER BY relevance DESC It seems to return the same results but should I be

Fulltext show the matching word in a multi-word search condition with OR

大兔子大兔子 提交于 2021-01-28 18:54:16
问题 I have a full-text indexed table and a column that is full-text indexed which contains a list of ids and some other information. Example: SearchInformation 100, 101, 102, 103, 104, Mike 200, 201, 202, 203, 204, John And my full-text query (a simplified version) is: SELECT searchInformation FROM Table T1 INNER JOIN CONTAINSTABLE(SearchTable, SearchInformation, '"100" OR "110" OR "Mick"') k ON T1.ID = k.[key] Now, this query identifies the correct row due to the "100" value being matched, but

How to optimize elasticsearch's full text search to match strings like 'C++'

半世苍凉 提交于 2021-01-28 12:28:43
问题 We have a search engine for text content which contains strings like c++ or c# . The switch to Elasticsearch has shown that the search does not match on terms like 'c++'. ++ is removed. How can we teach elasticsearch to match correctly in a full text search and not to remove special characters? Characters like comma , should of course still be removed. 回答1: You need to create your own custom-analyzer which generates token as per your requirement, for your example I created a below custom

Mysql full text index giving same score for exact match and partial, why?

让人想犯罪 __ 提交于 2021-01-28 06:33:06
问题 I am having this weird behavior in mysql 5.6 with full text indexes I am trying to search a patients database and get the exact matches first then partials by score with a Min Score so i don't return 100000+ results just some suggestions to prevent duplicates into a EHR type of app The problem is that the exact and partial matches have the same score... Is that an expected behavior? what options do I have? 回答1: You stated that you had the same score for exact matches and partials, but your

Whoosh - accessing search_page result items throws ReaderClosed exception

半世苍凉 提交于 2021-01-27 16:32:26
问题 Following is a simple pagination function. from whoosh import index def _search(q): wix = index.open_dir(settings.WHOOSH_INDEX_DIR) term = Term("title", q) | Term("content", q) page_id = 1 with wix.searcher() as s: return s.search_page(term, page_id, pagelen=settings.ITEMS_PER_PAGE) In [15]: p = _search("like") In [16]: p.results[0].reader.is_closed Out[16]: True if I try to access an attribute of a Hit, i get ReaderClosed exception. In [19]: p.results Out[19]: <Top 10 Results for Or([Term(

Django Full Text Search Optimization - Postgres

五迷三道 提交于 2021-01-21 04:30:11
问题 I am trying to create a Full Text Search for an address autocomplete feature, leveraging Django (v2.1) and Postgres (9.5), but the performance is not suitable for an auto-complete at the moment and I don't get the logic behind the performance results I get. For info the table is quite sizeable, with 14 million rows. My model: from django.db import models from postgres_copy import CopyManager from django.contrib.postgres.indexes import GinIndex class Addresses(models.Model): date_update =

SQL Server Weighted Full Text Search

删除回忆录丶 提交于 2021-01-20 16:51:28
问题 Currently I have a table that I search upon 4 fields, FirstName, LastName, MiddleName, And AKA's. I currently have a CONTAINSTABLE search for the rows and it works. Not well but it works. Now I want to make the First Name weighted higher and middle name lower. I found the command ISABOUT but that seems pretty worthless if I have to do it by word not column (hopefully I understood this wrong). This is not an option if its by word because I do not know how many words the user will enter. I