full-text-search

PostGresqL full-text Search characters problème

独自空忆成欢 提交于 2019-12-11 21:08:06
问题 Well my problem is : I am using the full-text search of postgresql with a french dictionnary, and I have in my data base some descriptions that contains names with one character for exemple : Amphi 'A' , Amphi 'C, Amphi 'D' ... well, for that, when I use tsvector auto creation trigger, somme names don't appear, for Amphi A I got 'amphi':1 'a':2 but for Amphi 'C' is 'amphi':1 without the it's name. please help me :D 回答1: That's because f.ex. C and D considered to be stop words in the french

Using Full-Text Search in SQL Server 2005 across multiple tables, columns

断了今生、忘了曾经 提交于 2019-12-11 20:43:56
问题 I have a problem, I created a full text search query which return a record(s), in which the paramater I have supplied match(es) in every fields(full-text indexed) of multiple tables. The problem is , when the user.id is equal to ceritification.AId it returns a records eventhough it was not satisfied with the parameter supplied. For this example I supplied a value "xandrick" which return an Id=184, but the problem is it returns two ids which is 184 and 154.What is the best way to return an ID

SQL Nested Query slow using IN

馋奶兔 提交于 2019-12-11 18:43:09
问题 I have the WordNet lexical database in MySQL. I am looking to find synonyms of given words. Currently the data is set out in three tables as a many-to-many relationship: words - (147,000 rows) wordid, word synsets - (119,000 rows) synsetid sense - (206,000 rows) wordid, synsetid All tables have indexes set up on them. Each word can have several synsets and each synset can have several words. I am looking to return all words for all synsets for a given word. There tends to be around 2 synsets

Skip XML content while doing regex search and replace

╄→尐↘猪︶ㄣ 提交于 2019-12-11 18:08:20
问题 I have a xml string as follows <root> <A id="1">This is an example</A> <B id="2"> <C id="3">this is tag c</C> </B> <D id="4">this is tag d</D> <E id="5"> <F id="6">this is tag f</F> <G id="7">this is tag g</G> . . . </E> </root> here i just want to search the word tag and replace it by Xml Tag using regex(Regular Expression), and i dont want to search that word inside the element <E>...</E> i.e., i want to skip element <E>...</E> while search and replace. Any help is appreciated. Thanks in

Automate search command in Visual Studio 2017 C#

偶尔善良 提交于 2019-12-11 17:05:53
问题 I need to search for a long list of phrases from a Solution. So instead of using the Ctr+Shift+F command to do it manually, is there a way to automate this search? As most I found was writing codes to search from a file, I want to use visual studio to search within its Solution. Thank you!! 回答1: You can use DTE.Find object to set search options and invoke search. With my Visual Commander extension it looks like: public void Run(EnvDTE80.DTE2 DTE, Microsoft.VisualStudio.Shell.Package package)

Powershell script to return search results from a list of keywords

三世轮回 提交于 2019-12-11 17:05:48
问题 I have a project name called 'SFO104' and I have a list of serial numbers i.e 5011849, 5011850 etc and I have to search a long list of 500+ serial numbers to see if they exist in any other documents not relating to the project name SFO104 or the PO number 114786 . I was thinking of outputting the search results to a csv for each serial number searched but the below isnt working. $searchWords = gc C:\Users\david.craven\Documents\list.txt $results = @() Foreach ($sw in $searchWords) { $files =

SQL Server full-text search performance dramatically down when using “OR” in where clause

让人想犯罪 __ 提交于 2019-12-11 15:29:33
问题 Suppose I have two tables tab1, tab2. Full text indexes created on all varchar columns on these two tables. Then issue following SQL: SELECT * FROM tab1 a JOIN tab2 b on a.ID = b.ID WHERE CONTAINS(a.*, @keystring) OR CONTAINS(b.*,@keystring) It is pretty slowly(almost 30 seconds). But If I issue following SQL: SELECT * FROM tab1 a JOIN tab2 b on a.ID = b.ID WHERE CONTAINS(a.*, @keystring) ...or: SELECT * FROM tab1 a JOIN tab2 b on a.ID = b.ID WHERE CONTAINS(b.*,@keystring) The performance is

Elasticsearch: Aggregation on filtered nested objects to find unique values

我的梦境 提交于 2019-12-11 14:32:55
问题 I have an array of objects (tags) in each document in Elasticsearch 5: { "tags": [ { "key": "tag1", "value": "val1" }, { "key": "tag2", "value": "val2" }, ... ] } Now I want to find unique tag values for a certain tag key. Something similiar to this SQL query: SELECT DISTINCT(tags.value) FROM tags WHERE tags.key='some-key' I have came to this DSL so far: { "size": 0, "aggs": { "my_tags": { "nested": { "path": "tags" }, "aggs": { "filter" : { "terms": { "tags.key": "tag1" } }, "aggs": { "my

JCR - Jackrabbit - Xpath expression for search content text of a file contained inside a node

不想你离开。 提交于 2019-12-11 14:20:06
问题 i am having a headache working with JackRabbit JCR in java. It's about making a xpath expression for searching for entities in my repository. Let's do a brief synopsis of what kind of data is stored, we have 3 a node class called "Entry", that extends another node class named "BaseEntry" and that extends another called "BaseNode". The Entry class represents a Node in our JCR system, and has a set of properties (mapped as attributes in the corresponding class), an also inherits the properties

Hibernate search “join” on TextFullSearch

落爺英雄遲暮 提交于 2019-12-11 14:17:35
问题 I have 2 entities : Ad and Category; I have a FullTextSearch (lucene) on Ad entity and I want to make a "join" beetween Ad And Category or to add somehow a where clause on Ad.category.id . My Add class : @Entity @Indexed @Table(name = "adds") public class Ad implements Serializable { @Id @SequenceGenerator(name="AdSQ", sequenceName="AdSQ", allocationSize = 1) @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "AdSQ") @Column(name = "id") @JsonProperty("Id") private Long __Id;