indexing

When does automatic partial reindexing actually run in Magento EE 1.13?

点点圈 提交于 2019-12-21 04:57:22
问题 Magento 1.13 added partial indexing for most indexes along with the ability to defer the indexing process to a cron job that runs asynchronously. My question then is, is there an existing cron job that does this or is this something I have to set up myself? The documentation is not clear on this: http://www.magentocommerce.com/knowledge-base/entry/ee113-indexing#reindex-options Update when scheduled to schedule reindexing using your Magento cron job. The change occurs either within the minute

Python Pandas sorting by multiindex and column

徘徊边缘 提交于 2019-12-21 04:29:19
问题 In Pandas 0.17 I try to sort by a specific column while maintaining the hierarchical index (A and B). B is a running number created when setting up the dataframe through concatenation. My data looks like this: C D A B bar one shiny 10 two dull 5 three glossy 8 foo one dull 3 two shiny 9 three matt 12 This is what I need: C D A B bar two dull 5 three glossy 8 one shiny 10 foo one dull 3 three matt 12 two shiny 9 Below is the code I am using and the result. Note: Pandas 0.17 alerts that

Why does add_index using 'gin' create a 'btree' index instead?

╄→尐↘猪︶ㄣ 提交于 2019-12-21 04:24:16
问题 I am on PostgreSQL 9.3.4 and Rails 4.0.4 . I add a "tags" column, and corresponding gin index (or, at least I ask for one). class AddTagsToPhotos < ActiveRecord::Migration def change add_column :photos, :tags, :text, array: true, null: false, default: [] add_index :photos, :tags, using: 'gin' end end Verify the results via psql : psql=# \d photos ... tags | text[] | not null default '{}'::text[] Indexes: "index_photos_on_tags" btree (tags) Notice that the "tags" index is of type btree -

How to find select option position?

家住魔仙堡 提交于 2019-12-21 04:23:07
问题 I'm trying to find an option's index. For example, I would like to get 1 when I run the following fake code JS: $("#test[value='USD']").index() ? HTML: <select id='test'> <option value='CNY'>CNY</option> <option value='USD'>USD</option> </select> is this possible? 回答1: You were very close, you want to use index on the option element, not the select : var i = $("#test option[value='USD']").index(); Gratuitous live example Note that this will break if your select contains optgroup elements. If

Indexed ranged search algorithm for IP Addresses

给你一囗甜甜゛ 提交于 2019-12-21 04:15:20
问题 Given an ACL list with 10 billion IPv4 ranges in CIDR notiation or between two IPs: x.x.x.x/y x.x.x.x - y.y.y.y What is an effecient search/indexing algorithm for testing that a given IP address meets the critera of one or more ACL ranges? Lets assume most ACL range definitions span a great number of class C blocks. Indexing points via hash tables is easy but try as I might have not been able to come up with a reasonable method for detecting which points are covered by a large list of "lines"

Aggregation pipeline and indexes

心已入冬 提交于 2019-12-21 04:14:39
问题 From http://docs.mongodb.org/manual/core/indexes/#multikey-indexes, it is possible to create an index on an array field using a multikey index. http://docs.mongodb.org/manual/applications/aggregation/#pipeline-operators-and-indexes lists some ways of how an index can be used in aggregation framework. However, there may be times that I may need to perform an $unwind on an array field to perform a $group . My question is, are multikey indexes (or any index using such array field) can still be

MongoDB indexes for $elemMatch

家住魔仙堡 提交于 2019-12-21 04:04:52
问题 The indexes help page at http://www.mongodb.org/display/DOCS/Indexes doesn't mention $elemMatch and since it says to add an index on my 2M+ object collection I thought I'd ask this: I am doing a query like: { lc: "eng", group: "xyz", indices: { $elemMatch: { text: "as", pos: { $gt: 1 } } } } If I add an index {lc:1, group:1, indices.text:1, indices.pos:1} will this query with the $elemMatch component be able to be fully run through the index? 回答1: Based on your query, I imagine that your

Spring Data - MongoDB indexing DBRef

独自空忆成欢 提交于 2019-12-21 03:57:35
问题 I'm using spring-data-mongodb-1.2.0.RELEASE. I have two classes A and B where B has a reference to A and it is annotated with @DBRef. Class A: @Document(collection = "a") public class A { @Id public String id; /** The TicketGrantingTicket this is associated with. */ @Field public String name; public A(String id, String name) { this.id = id; this.name = name; } } Class B: @Document(collection = "b") public class B { @Id public String id; @Field public String name; @DBRef @Indexed public A a;

Non-Clustered Index on a Clustered Index column improves performance?

佐手、 提交于 2019-12-21 03:57:05
问题 In SQL Server 2005, the query analyzer has told me many times to create a non-clustered index on a primary ID column of a table which already has a clustered index. After following this recommendation, the query execution plan reports that the query should be faster. Why would a Non-Clustered index on the same column (with the same sort order) be faster than a Clustered index? 回答1: A clustered index has all the data for the table while a non clustered index only has the column + the location

R return the index of the minimum column for each row

孤街浪徒 提交于 2019-12-21 03:48:28
问题 I have a data.frame that contains 4 columns (given below). I want to find the index of the minimum column (NOT THE VALUE) for each row. Any idea hiw to achieve that? > d V1 V2 V3 V4 1 0.388116155 0.98999967 0.41548536 0.76093748 2 0.495971331 0.47173142 0.51582728 0.06789924 3 0.436495321 0.48699268 0.21187838 0.54139290 4 0.313514389 0.50265539 0.08054103 0.46019601 5 0.277275961 0.39055360 0.29594162 0.70622532 6 0.264804739 0.86996266 0.85708635 0.61136741 7 0.627344463 0.54277873 0