full-text-search

Full Text difference between SQL Server and Postgres

萝らか妹 提交于 2019-12-12 03:22:48
问题 I have access ( no source code ) to webservice to do street and poi search, the back end is using PostgreSQL. Is very good and accurated. Can weight the words to match State or City , know when is a Street or a Building If I search: "calle 15 lomas del avila" - "calle" mean STREET - "lomas del avila" is a sector in Caracas city. Found a Bus station and the street name "calle 15" Now we got some source code for a SQL Server 2012 version from the same provider as webservice. And this time I

SQL Server Full-Text Search against Document (multiple related tables and field)

微笑、不失礼 提交于 2019-12-12 02:46:10
问题 I have a document (in this case Invoice) structure which contains multiple tables: Invoice Header (No. (PK), Customer Name, Customer Address, ...) Invoice Lines (Invoice No. (PK), Line No. (PK), Description, Qty., ...) Invoice Header Comments (Invoice No. (PK), Comment No. (PK), Comment) When I run a search I would like to execute it against whole document (as one entity, not against separate fields (Customer Name + Customer Address + Description + Comment). Example: All documents which have

On search/highlight click -> existing div becomes wrapped with existing span

随声附和 提交于 2019-12-12 02:19:02
问题 I have a problem with javascript search and highlight text. For example, there is existing span element and existing div element. Problem is that if I click on search button for some reason div element becomes a child of span element. To explain it better I have created JS fiddle to show the problem: function highlightSearch() { $('span').removeClass('highlighted'); var text = document.getElementById('query').value; var query = new RegExp("(\\b" + text + "\\b(?!([^<]+)?>))", "gim"); var e =

SQL Server 2005 FTS unexpected results

耗尽温柔 提交于 2019-12-12 02:11:28
问题 I have an Indexed View with two columns, a primary key char and a field for full-text indexing varchar(300). I need to search from a MS Great Plains database, so I created the view to populate a field with concatenated values from my primary table IV00101. CREATE VIEW SearchablePartContent WITH SCHEMABINDING AS SELECT ITEMNMBR, rtrim(ITEMNMBR)+' '+rtrim(ITMSHNAM)+' '+rtrim(ITMGEDSC) as SearchableContent FROM dbo.IV00101 GO -- create the index on the view to be used as full text key index

Date range query with lucene

会有一股神秘感。 提交于 2019-12-12 01:42:30
问题 I am trying to take data between specific date ranges from mssql db. But returns nothing. I found a solution here on stackoverflow but it is not working. Here what I have done : This is the date field from the entity class: @Basic(optional = false) @Column(name = "tarih") @Temporal(TemporalType.TIMESTAMP) @DateBridge(resolution = Resolution.MILLISECOND) private Date tarih; This is how I am trying to take date between specific dates: SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM

ERROR: index 'products': too many string attributes (current index format allows up to 4 GB)

本小妞迷上赌 提交于 2019-12-12 01:27:54
问题 Got this when tried to index table in database with 25GB of data. Sphinx contains index declaration with following fields: sql_field_string = field_indexer #some keywords sql_field_string = product_name sql_field_string = description sql_attr_float = price sql_field_string = product_url sql_field_string = image_url sql_field_string = sku sql_attr_uint = merchant_id sql_attr_uint = network_id All of them must be indexed. How solve this problem? Multiple indexes or distributed indexes are

Lucene vs Solr, indexning speed for sampe data

别说谁变了你拦得住时间么 提交于 2019-12-12 01:21:31
问题 I have worked upon Lucene before and now moving towards Solr. The problem is that I am not able to do Indexing on Solr as fast as Lucene can do. My Lucene Code: public class LuceneIndexer { public static void main(String[] args) { String indexDir = "/home/demo/indexes/index1/"; IndexWriterConfig indexWriterConfig = null; long starttime = System.currentTimeMillis(); try (Directory dir = FSDirectory.open(Paths.get(indexDir)); Analyzer analyzer = new StandardAnalyzer(); IndexWriter indexWriter =

SOLR - delta import not with last_modified

你说的曾经没有我的故事 提交于 2019-12-12 01:17:46
问题 I saw only ways using delta import with last_modified. Is there some other ways to do delta_imports withut using timestamps? For example, if i have unique key(integer), can i tell SOLR to index only those, which are greater then my last unique key? 回答1: So you could definitely hack this in yourself. However, what about if you manipulate an existing row? If you use last unique key you won't know that an existing row changed... Can you explain more fully the usecase for this? Trying to think of

Return two result sets when using WITH TempResults AS

与世无争的帅哥 提交于 2019-12-11 23:33:41
问题 I have the following query where I would like to return two result sets. One being the results as a table and the second just returning the number of potential results, or MaxResults. The last line errors with Invalid object name ResultsTemp . It does not work until I comment out the second last line. It appears I can only use the ResultsTemp once. DECLARE @StartRow int; DECLARE @MaxRows int; set @StartRow = 0; set @MaxRows = 5; WITH ResultsTemp AS ( SELECT ROW_NUMBER() OVER (ORDER BY FTS

Work around of Android SQLite full-text search for Asian text

无人久伴 提交于 2019-12-11 21:33:05
问题 I have read about many posts asking whether the SQLite based full-text search can be done in Android, and all the answers point out that the built-in SQLite of Android does not allow custom tokenizer. The default tokenizer considers the words separated by space or other signs, but Asian words (like Chinese) need its special tokenizer, but Android does not allow adding custom one. The posts I read were years ago. Is there any update in recent Android versions? I just searched and did not find