not query in lucene

A very late reply, but it might be useful for somebody else later: *:* AND NOT country:sweden IF I’m not mistaken this should do a logical “AND” with all documents and the documents with a country that is different from “sweden”.

What is the differences between the term SSTable and LSM Tree

Probably one of the best explanations of SSTables and LSM-Trees for mortals is given by Martin Kleppmann in his “Designing Data-Intensive Applications” book. These data structures are explained in chapter 3, “Storage and Retrieval”, pages 69 through 79. It’s a really great read, I would recommend the whole book! Impatient ones could find my synopsis … Read more

Drop a specific row in Pandas

df = pd.DataFrame([[‘Jhon’,15,’A’],[‘Anna’,19,’B’],[‘Paul’,25,’D’]]) df. columns = [‘Name’,’Age’,’Grade’] df Out[472]: Name Age Grade 0 Jhon 15 A 1 Anna 19 B 2 Paul 25 D You can get the index of your row: i = df[((df.Name == ‘jhon’) &( df.Age == 15) & (df.Grade == ‘A’))].index and then drop it: df.drop(i) Out[474]: Name Age Grade 1 … Read more

Filtering multiple items in a multi-index Pandas dataframe

You can get_level_values in conjunction with Boolean slicing. In [50]: print df[np.in1d(df.index.get_level_values(1), [‘Lake’, ‘River’, ‘Upland’])] Area NSRCODE PBL_AWI CM Lake 57124.819333 River 1603.906642 LBH Lake 258046.508310 River 44262.807900 The same idea can be expressed in many different ways, such as df[df.index.get_level_values(‘PBL_AWI’).isin([‘Lake’, ‘River’, ‘Upland’])] Note that you have ‘upland’ in your data instead of ‘Upland’

Use of indexes for multi-word queries in full-text search (e.g. web search)

As you said some-word -> [doc385, doc211, doc39977, …] (sorted by rank, descending), I think the search engine may not do this, the doc list should be sorted by doc ID, each doc has a rank according to the word. When a query comes, it contains several keywords. For each word, you can find a … Read more

Can MongoDB use an index when checking for existence of a field with $exists operator?

Updated: Seems $exists queries use index properly now based on these tickets $exists queries should use index & {$exists: false} will not use index Old Answer: No, there is no way to tell mongodb to use index for exists query. Indexing is completely related to data. Since $exists is only related to the keys (fields) … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)