full-text-search

Fulltext and composite indexes and how they affect the query

非 Y 不嫁゛ 提交于 2020-01-02 17:16:35
问题 Just say I had a query as below.. SELECT name,category,address,city,state FROM table WHERE MATCH(name,subcategory,category,tag1) AGAINST('education') AND city='Oakland' AND state='CA' LIMIT 0, 10; ..and I had a fulltext index as name,subcategory,category,tag1 and a composite index as city,state ; is this good enough for this query? Just wondering if something extra is needed when mixing additional AND 's when making use of the fulltext index with the MATCH/AGAINST. Edit: What I am trying to

how to solve - “too many text index for ..” - mongodb error?

前提是你 提交于 2020-01-02 14:33:16
问题 Getting this error and don't know why, here is the snippet of the function that deals with mongodb full-text search: ... db.collection.ensureIndex({ description: 'text' }, { name: 'TextIndex' }); db.collection.runCommand('text', { search: 'my query' }, function (err, res) { console.log(res); // { // "message": "failed to search items for user by query", // "error": "too many text index for: .. // } }); The same problem appears in mongo shell as well.. 来源: https://stackoverflow.com/questions

how to solve - “too many text index for ..” - mongodb error?

回眸只為那壹抹淺笑 提交于 2020-01-02 14:32:17
问题 Getting this error and don't know why, here is the snippet of the function that deals with mongodb full-text search: ... db.collection.ensureIndex({ description: 'text' }, { name: 'TextIndex' }); db.collection.runCommand('text', { search: 'my query' }, function (err, res) { console.log(res); // { // "message": "failed to search items for user by query", // "error": "too many text index for: .. // } }); The same problem appears in mongo shell as well.. 来源: https://stackoverflow.com/questions

Solr open document after searching a keyword

旧巷老猫 提交于 2020-01-02 10:58:33
问题 I am trying to index some PDF documents and then create a Search UI . This question is somewhat related to Solr Index PDF documents and post them to a remote server 1) Indexing PDF Docs - > I use tika jar to convert PDF to text files and then use curl command to index them. 2) Search UI --> I m using Solritas browse feature and its built in UI. Objective : When I search for a word say "Lucene" in the list of indexed documents and when I get a result set for the given query I want a link to be

sys.dm_fts_parser sql full text

我怕爱的太早我们不能终老 提交于 2020-01-02 10:02:22
问题 We having a really hard time to figure out two similar strings given to sys.dm_fts_parser gives different results select * from sys.dm_fts_parser('"0 CAD"', 0, null, 0) seems to think that "0 CAD" is one token (returns 2 token) select * from sys.dm_fts_parser('"0 cad"', 0, null, 0) returns 3 tokens - correctly more importantly and even more confusing is why select * from Table where contains(*,"point 5 CAD") works and select * from Table where contains(*,"point 5 cad") fails where the column

sys.dm_fts_parser sql full text

戏子无情 提交于 2020-01-02 10:00:11
问题 We having a really hard time to figure out two similar strings given to sys.dm_fts_parser gives different results select * from sys.dm_fts_parser('"0 CAD"', 0, null, 0) seems to think that "0 CAD" is one token (returns 2 token) select * from sys.dm_fts_parser('"0 cad"', 0, null, 0) returns 3 tokens - correctly more importantly and even more confusing is why select * from Table where contains(*,"point 5 CAD") works and select * from Table where contains(*,"point 5 cad") fails where the column

Custom full-text index stored in Cassandra

╄→尐↘猪︶ㄣ 提交于 2020-01-02 09:38:29
问题 I've got a situation where I'm using Cassandra for DB and I need full-text search capability. Now I'm aware of Apache Solr, Apache Cassandra, and DSE search. However, I do not want to use a costly and proprietary software(DSE search). The reason I do not want to use Apache Solr is because I don't want to deal with HA, sharding, and redundency for it. Cassandra is perfect for HA, sharding, and redundency; I would like to store my full-text index in the existing Cassandra DB. So what I'm

Mysql german accents not-sensitive search in full-text searches

大城市里の小女人 提交于 2020-01-02 07:38:33
问题 Let`s have a example hotels table: CREATE TABLE `hotels` ( `HotelNo` varchar(4) character set latin1 NOT NULL default '0000', `Hotel` varchar(80) character set latin1 NOT NULL default '', `City` varchar(100) character set latin1 default NULL, `CityFR` varchar(100) character set latin1 default NULL, `Region` varchar(50) character set latin1 default NULL, `RegionFR` varchar(100) character set latin1 default NULL, `Country` varchar(50) character set latin1 default NULL, `CountryFR` varchar(50)

mysql search title, description and multi rows tag

僤鯓⒐⒋嵵緔 提交于 2020-01-02 07:35:16
问题 i have following tables. the entry table describe +-------------+-------------------+------+-----+---------+----------------+ | Field | Type | Null | Key | Default | Extra | +-------------+-------------------+------+-----+---------+----------------+ | id | int(11) unsigned | NO | PRI | NULL | auto_increment | | title | varchar(255) | YES | | NULL | | | slug | varchar(255) | YES | | NULL | | | description | text | YES | | NULL | | | user_id | int(10) unsigned | NO | | NULL | | | unsafe | enum(

postgres: Composite fulltext / btree index

纵然是瞬间 提交于 2020-01-02 07:11:23
问题 I want to do a fulltext search on one column and sort in a different column. If I index these two columns separately postgres can't use both indexes in this query. Is there a way to create a composite index that could be used in this scenario? 回答1: Unfortunately not. While you can attach scalar columns to a GIN index via the btree_gin contrib module, Postgres can't use a GIN index for sorting. From the docs: Of the index types currently supported by PostgreSQL, only B-tree can produce sorted