Return-Path: X-Original-To: apmail-lucene-solr-user-archive@minotaur.apache.org Delivered-To: apmail-lucene-solr-user-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 5EC5A9117 for ; Fri, 7 Oct 2011 14:50:58 +0000 (UTC) Received: (qmail 63742 invoked by uid 500); 7 Oct 2011 14:50:55 -0000 Delivered-To: apmail-lucene-solr-user-archive@lucene.apache.org Received: (qmail 63692 invoked by uid 500); 7 Oct 2011 14:50:55 -0000 Mailing-List: contact solr-user-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: solr-user@lucene.apache.org Delivered-To: mailing list solr-user@lucene.apache.org Received: (qmail 63684 invoked by uid 99); 7 Oct 2011 14:50:55 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 07 Oct 2011 14:50:55 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of krickert@gmail.com designates 209.85.212.48 as permitted sender) Received: from [209.85.212.48] (HELO mail-vw0-f48.google.com) (209.85.212.48) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 07 Oct 2011 14:50:49 +0000 Received: by vws7 with SMTP id 7so4750592vws.35 for ; Fri, 07 Oct 2011 07:50:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; bh=hWfz/GzflpGP4dJiMhNpbLRBaplpUTESy+wb7j108pI=; b=mtJ0WVcysKxctq8SgmJlBwz/XC3YIoIlRBQaYl8Lz6a32FiCshqpdNZD2oY8HTA6HW CJaDmFbEnwzW/4cp5buHEMIDP8/LOhYDDYHHqnM58MpbkXgunGoiFeCeJIVWj4r8vGxz oJZkVuuu0Ne7LRAg02nb1QRWsODkfMYqe16ok= MIME-Version: 1.0 Received: by 10.52.114.42 with SMTP id jd10mr2943509vdb.88.1317999028020; Fri, 07 Oct 2011 07:50:28 -0700 (PDT) Received: by 10.52.165.138 with HTTP; Fri, 7 Oct 2011 07:50:27 -0700 (PDT) Date: Fri, 7 Oct 2011 10:50:27 -0400 Message-ID: Subject: "Private" fields in solr From: Kristian Rickert To: solr-user@lucene.apache.org Content-Type: text/plain; charset=ISO-8859-1 Is there a way to include the notion of "private" fields for a text search? For example, let's say I have three fields: UserName - text name UserCity - city the user belongs to PrivateUserTags - key/value pair of another user's "tags" about that user I'd like to have a text search on all three fields but when matching on the private tags, only match on the tags of the particular user. So I'd like to have a query like this: Let's say that User ID 100 is searching: Main Query:(query1 OR query2) query1: q=great user qf=userName userCity query2: q=great user qf=privateUserTags ...And then somehow tie user ID 100 to this. So far I've thought of the following ways, but I'd like to know if there's a more elegant approach in solr: 1) prefix the user's ID to each keyword in the privateUserTag field, changing the query2 query to 100_great 100_user 2) use a dynamic field for privateUserTags - so the field would be privateUserTags_100 A third way would be to introduce a new field type (PrivateText?) that would be a poly field array. So for I'm feeling #2 is the most elegant - is there a better way to do this? I'd especially like it if I can add this functionality to a single dismax query since the boost query that I use is somewhat complex. Thoughts? Kristian