Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 6A357200AE2 for ; Fri, 27 May 2016 09:02:48 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 68990160A12; Fri, 27 May 2016 07:02:48 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id B0EED16099F for ; Fri, 27 May 2016 09:02:47 +0200 (CEST) Received: (qmail 79352 invoked by uid 500); 27 May 2016 07:02:46 -0000 Mailing-List: contact dev-help@zest.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@zest.apache.org Delivered-To: mailing list dev@zest.apache.org Received: (qmail 79340 invoked by uid 99); 27 May 2016 07:02:46 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 27 May 2016 07:02:46 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id 35C88C0D53 for ; Fri, 27 May 2016 07:02:46 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.28 X-Spam-Level: * X-Spam-Status: No, score=1.28 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.001, HTML_MESSAGE=2, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd4-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id 6vRVpfiw63Gw for ; Fri, 27 May 2016 07:02:44 +0000 (UTC) Received: from mail-oi0-f50.google.com (mail-oi0-f50.google.com [209.85.218.50]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id 737465F1F3 for ; Fri, 27 May 2016 07:02:43 +0000 (UTC) Received: by mail-oi0-f50.google.com with SMTP id k23so160823670oih.0 for ; Fri, 27 May 2016 00:02:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to; bh=3YbYOCNNacXfuEyTFSqrdtf4zsuDx9FVp/2/UxisEug=; b=qMwoHO3F3om4h72AS68niXQ0YxPt9JL7CxRZW/RY6nFEz+zlp3N973y5jMojVMXLtz RAOVOwrA+DsUZiWOO54Q83vSXoCaTmn5O1PDbWAhwXKElyq8omWKmjsj3uNAi3MMkair D3XkBUUrz1B/vx6R0ihT6PfNPS89AYNjSr7pi+EYXri7a6WgJV4eBsk0kIBOoJMVegAf rsWyz7IL3R9b/RPSOinJo/BGx0WwKbrPsGb0/S4wZ3r/zwmckBJgJxxuC5kpeWzPE1BD AUVVR/oYxRGal6eWmwlL4p6VGXckBIfIqaUcqP/Xp6SvYFuRNAEc1h3Bje8i17PvlfNX RdQQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to; bh=3YbYOCNNacXfuEyTFSqrdtf4zsuDx9FVp/2/UxisEug=; b=k0oN1J0+h8l8QIKirK2G99EWL5exw21Qa7k38qvNejZT+YEwBm7Knb8/I+5PYF7Dxd RyanxL8X35dAKzQhkx8CrrgLzgRaWaZeTlwLqEFTSlcRdXMUWwPEwhSAjLgpJz/D4Ctv tapBcyXfmvgT/seDuZ5C+NHBFN2ljZWhK6UfWwFQzaMc7w8p83jJL+IHb7+QMuNX6r/6 JQSFedIlREn9AVKzqjJDP9hW/Ni5Rftrw28AWSv3mTHMpiRuEnLhbky4xDk5WR8GEB/5 bYYE3Sxul8E/he7mu9UZ1wUN4HWvKnGAify7AuRlQoD5pgc/yrNgPhSQ+DzDvcP9D9I8 BTHw== X-Gm-Message-State: ALyK8tKI7dArl7A4HcMHO61DdzKBItH+i0KxifeEud3yaEAfDJdTZyZLEWHBDMR3TzDx8Sxn1vb8gM2t67sMcg== X-Received: by 10.202.195.211 with SMTP id t202mr8556958oif.73.1464332562272; Fri, 27 May 2016 00:02:42 -0700 (PDT) MIME-Version: 1.0 Sender: hedhman@gmail.com Received: by 10.202.225.213 with HTTP; Fri, 27 May 2016 00:02:22 -0700 (PDT) In-Reply-To: References: From: Niclas Hedhman Date: Fri, 27 May 2016 15:02:22 +0800 X-Google-Sender-Auth: OcSUpw48-kaQedHZYepUia8jxj0 Message-ID: Subject: Re: entity composite query To: dev Content-Type: multipart/alternative; boundary=001a1135342e35193b0533cd7ee4 archived-at: Fri, 27 May 2016 07:02:48 -0000 --001a1135342e35193b0533cd7ee4 Content-Type: text/plain; charset=UTF-8 Cool that you figured this out. The Reindexer is totally under your control and doesn't kick in automatically in any way or form. We thought of trying to find a way to figure out when/if the index gets out of sync, but concluded that it was too expensive overhead to do this. Basically, the Reindexer will be bound to the EntityStore that is VIsible, ask for all Entities, by calling entityStates() and forward those to all StateChangeListeners that are Visible. So, you call reindex() on the Reindexer. If you have many reindexer, you could call reindexAll() which will locate all reindexers and call reindex() on each. This is useful when there are many modules of entity stores. There are two general issues that you need to keep in mind; 1. Not all Entity Stores implements entityStates(), mostly because the underlying store doesn't provide a convenient mechanism to iterate everything. 2. Unless you first clear all in the Index, deletions will not be detected, and therefor the index might contain to many entity references in that case. Additionally, reindexing is not really thread safe, so need to bring the system down while reindexing is happening. I hope that clears the smoke. Niclas On Fri, May 27, 2016 at 10:27 AM, zhuangmz08 wrote: > ReindexerService, I think this is the answer. More over, could I take more > control on reindexing. > > > > > ------------------ Original ------------------ > From: "";; > Date: Fri, May 27, 2016 09:47 AM > To: "dev"; > > Subject: entity composite query > > > > Hi, > I'm confused about the index query. > first time : > 1. setup redis entity store server (RedisMapEntityStoreAssembler). > 2. insert two entity composites: A, B. > 3. remain running the redis server. > second time: > 1. setup in-memory index query (RdfMemoryStoreAssembler). > 2. insert another two entity composites: C, D. > 3. query all the entities, expected 4 entities found, however, only C & D > are found, A & B are missing. > It seems that A & B are never indexed? How could I reindex the whole > entity store? Or, how could I reindex entity store on specific class type > of entity composite? > Thanks a lot. > -- Niclas Hedhman, Software Developer http://zest.apache.org - New Energy for Java --001a1135342e35193b0533cd7ee4--