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 58FAC10773 for ; Sat, 8 Jun 2013 10:30:25 +0000 (UTC) Received: (qmail 33426 invoked by uid 500); 8 Jun 2013 10:30:20 -0000 Delivered-To: apmail-lucene-solr-user-archive@lucene.apache.org Received: (qmail 32988 invoked by uid 500); 8 Jun 2013 10:30:13 -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 32980 invoked by uid 99); 8 Jun 2013 10:30:11 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 08 Jun 2013 10:30:11 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=RCVD_IN_DNSWL_NONE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of SRS0=k2AYpo=PY=basetechnology.com=jack@yourhostingaccount.com designates 65.254.253.52 as permitted sender) Received: from [65.254.253.52] (HELO mailout06.yourhostingaccount.com) (65.254.253.52) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 08 Jun 2013 10:30:05 +0000 Received: from mailscan08.yourhostingaccount.com ([10.1.15.8] helo=mailscan08.yourhostingaccount.com) by mailout06.yourhostingaccount.com with esmtp (Exim) id 1UlGP3-0000m7-2U for solr-user@lucene.apache.org; Sat, 08 Jun 2013 06:29:45 -0400 Received: from impout02.yourhostingaccount.com ([10.1.55.2] helo=impout02.yourhostingaccount.com) by mailscan08.yourhostingaccount.com with esmtp (Exim) id 1UlGP2-0005Ag-KG for solr-user@lucene.apache.org; Sat, 08 Jun 2013 06:29:44 -0400 Received: from authsmtp03.yourhostingaccount.com ([10.1.18.3]) by impout02.yourhostingaccount.com with NO UCE id lmVk1l00403yUm201mVkbw; Sat, 08 Jun 2013 06:29:44 -0400 X-Authority-Analysis: v=2.0 cv=HIVB5/Rv c=1 sm=1 a=UdCbmyego4VUa/xJBgcoFg==:17 a=aQzbgH187woA:10 a=3jZET7lWBKwA:10 a=IkcTkHD0fZMA:10 a=jvYhGVW7AAAA:8 a=Am9gAIKSfh8A:10 a=mV9VRH-2AAAA:8 a=ztw8QLqLAAAA:8 a=LFzJef_elt0UbUKYOj4A:9 a=QEXdDO2ut3YA:10 a=oAfpiZxlE8wA:10 a=maIvl2Yd+fJND/e85XqkCw==:117 X-EN-OrigOutIP: 10.1.18.3 X-EN-IMPSID: lmVk1l00403yUm201mVkbw Received: from 207-237-114-232.c3-0.nyr-ubr1.nyr.ny.cable.rcn.com ([207.237.114.232] helo=JackKrupansky) by authsmtp03.yourhostingaccount.com with esmtpa (Exim) id 1UlGP0-0006d0-1t for solr-user@lucene.apache.org; Sat, 08 Jun 2013 06:29:42 -0400 Message-ID: <9F8EE2762B87410AB9E0A21CE47CC223@JackKrupansky> From: "Jack Krupansky" To: References: In-Reply-To: Subject: Re: custom field tutorial Date: Sat, 8 Jun 2013 06:29:17 -0400 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="utf-8"; reply-type=original Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal Importance: Normal X-Mailer: Microsoft Windows Live Mail 15.4.3555.308 X-MimeOLE: Produced By Microsoft MimeOLE V15.4.3555.308 X-EN-UserInfo: e0a4b55451ed9f27313ebf02e3d4348d:fc4a93e1349e680c52bdd723c0ab3ef6 X-EN-AuthUser: jack@basetechnology.com Sender: "Jack Krupansky" X-EN-OrigIP: 207.237.114.232 X-EN-OrigHost: 207-237-114-232.c3-0.nyr-ubr1.nyr.ny.cable.rcn.com X-Virus-Checked: Checked by ClamAV on apache.org Usually, people want to do the opposite - store the numeric code as a numeric field for perceived efficiency and let the user query and view results with the text form. But, there isn't any evidence of any great performance benefit of doing so - just store the string code in a string field. Also, your language is confusing - you say "a single integer field that maps to the string field" - do you actually want two separate fields? Is that the case? If so, just let the user query against either field depending on what their preference is for numeric or string codes. And your language seems to indicate that you want the user to query by numeric code but the field would be indexed as a string code. Is that the case? Maybe you could clarify your intentions. Sure, with custom code, custom fields, custom codecs, custom query parsers, etc. you can do almost anything - but... the initial challenge for any Solr app developer is to first try and see if they can make due with the existing capabilities. -- Jack Krupansky -----Original Message----- From: Anria Billavara Sent: Saturday, June 08, 2013 2:54 AM To: solr-user@lucene.apache.org Subject: Re: custom field tutorial You seem to know what you want the words to map to, so index the map. Have one field for the word, one field for the mapped value, and at query time, search the words and return the mapped field. If it is comma separated, so be it and split it up in your code post search. Otherwise, same as Wunder, in my many years in search this is an odd request Anria Sent from my Samsung smartphone on AT&T -------- Original message -------- Subject: Re: custom field tutorial From: Walter Underwood To: solr-user@lucene.apache.org CC: What are you trying to do? This seems really odd. I've been working in search for fifteen years and I've never heard this request. You could always return all the fields to the client and ignore the ones you don't want. wunder On Jun 7, 2013, at 8:24 PM, geeky2 wrote: > can someone point me to a "custom field" tutorial. > > i checked the wiki and this list - but still a little hazy on how i would > do > this. > > essentially - when the user issues a query, i want my class to interrogate > a > string field (containing several codes - example boo, baz, bar) > > and return a single integer field that maps to the string field > (containing > the code). > > example: > > boo=1 > baz=2 > bar=3 > > thx > mark >