full-text-search

SQL Full-Text-Search returns no results when any noise words are in search string

二次信任 提交于 2019-12-14 01:07:09
问题 I have an asp.net web page used to search for company names in our database using FTS. They enter the company name in a search box and submit. First I trim any leading or trailing spaces, then i replace each internal space with " NEAR ". So a search for: "The Association of Lefthanded Picklepickers" Is fed as: "The NEAR Association NEAR of NEAR Lefthanded NEAR Picklepickers" Into the following WHERE clause used by the search results grid: WHERE CONTAINS(CompanyName, @Search) This method works

How to search a word in a file using PowerShell script

大城市里の小女人 提交于 2019-12-13 20:05:13
问题 I have a list of 350 folders and each folder has a file Access log. I need to search all 350 files under all 350 folders for a name "Hound" and display the name of the folders which contain the name "Hound" in their access log file. Below is my code, can someone help me with what should be added here to get the desired output, please? #List all the folders in C:\testfolder $folders = (Get-ChildItem -Path "C:\testfolder" | Where-Object{$_.Attributes -eq "Directory"} | Select Fullname) #looping

Full-text search stemming not returning consistent results in different languages

ぐ巨炮叔叔 提交于 2019-12-13 19:57:20
问题 I have an Sql Server 2016 database with full text indexes defined on 4 columns, each configured for a different language: Dutch, English, German & French. I used the wizard to setup the full-text index. I am using CONTAINSTABLE with FORMSOF and for each language I would expect executing a query with either the word stem or any verb form would return both results from the example table. This seems to work in English & German, somewhat in French, and not at all in Dutch. I am using a very basic

Storing and searching dynamic key value pairs in Solr document

只愿长相守 提交于 2019-12-13 18:32:15
问题 I need to store and index key value pairs attached with a particular Solr document. For eg, there might be a variable number of tags(labels) attached to a solr document with each tag name having an integer along with it as a value for it. <doc> <id>1001</id> #dymanic tags attached php=>10 web=>2 programming=>12 mysql=>10 </doc> So when I search for "php" this document should showup in the search results and I should be able to read its value for that particular document (in case of example

ordering results based on combine weightage of fields

大兔子大兔子 提交于 2019-12-13 17:46:30
问题 I have a very interesting question for all you SQL masters out there. As you all know that one of the prime requirement of any e-commerce based shopping cart is a good search. Few days back, I got to know about MySQL full-text search, and I must say it's quiet interesting. I want to go one step ahead in search query, and need to provide weightage to fields. These weightage would allow sorting of search result. For example: I have following fields in product table productid name description

SQL-Server Full Text Index Unexpected results

倾然丶 夕夏残阳落幕 提交于 2019-12-13 17:07:05
问题 MS SQL SERVER 2012 I have a full text index configured on a database which for the main part seems to be functioning correctly. I have a keyword field that contains the following text: Veterinary Products Beaphar Fiprotec Spot On Small Dog 67mg x 1 235_ldzr_2 Beaphar 87112311437_ldzr_2 When trying to select the row I am getting unexpected results select * from products where CONTAINS(keywords,'"235*"') select * from products where CONTAINS(keywords,'"87112311437_ldzr_2*"') Both return the

SQL server 2008 multiple “LIKE” problem

社会主义新天地 提交于 2019-12-13 14:26:13
问题 I'm using MS SQL 2008 and I'm facing a challenge for a few day's now. My SP parameter can contain one to three words in a string (nvarchar) and I have to return matching LIKE %phrase% records for each word in a string. Example. My parameter is: "stack overflow" Records that must be returnd: miSTACKon noOVERFLOWon STACKit poOWERFLOW STACK OWERFLOW I also considered FTS but CONTAINS function takes only one wildcard at the end of the (each) phrase phrase* Is there a solution to this problem

Full Text not indexing varbinary column (with html)

Deadly 提交于 2019-12-13 14:00:16
问题 I have a table with HTML data, that I want to search using the Full Text Index via an html-filter So I created an index: CREATE FULLTEXT CATALOG myCatalog AS DEFAULT CREATE FULLTEXT INDEX ON myTable (Body TYPE COLUMN Filetype) KEY INDEX PK_myTable Body is a varbinary(max) column with HTML. The Filetype column is a computed column returns .html . No results are being returned. I verified that .html filter is installed. FullText index is also installed properly and works fine if I convert the

Java :- String search in proximity manner

。_饼干妹妹 提交于 2019-12-13 09:38:20
问题 I need a pure Java program to search on a given string to "find words near each other" - each-other distance need to be specified. More specifically said :- finds word1 and word2 in any order, as long as they occur within a certain distance of each other. For example :- to search for a "cancer" and "problems" within 3 words of each other in a given string - if found return "true" else return "false". String term = "cancer problems"; String text = "doctors found many cancer related chest

how do I find websites using tag search?

独自空忆成欢 提交于 2019-12-13 08:06:05
问题 I have the following tags table: web | tags ------------------------------------------------------------ google.com | search,google,searchengine,engine,web facebook.com | facebook,social,networking,friends youtube.com | video,youtube,videos,entertainment yahoo.com | yahoo,search,email,news,searchengine bing.com | search,searchengine,microsoft,bing,tools What I am trying to achieve is searching by tags to get a list of websites from this table. If for example some one search by google.com then