So right now I'm thinking that solr just doesn't like me. I just noticed that the following document config doesn't work for me
<document> <entity name="product" query="select price_1,price_2,price_3, pv.product_id, pv.product_id as id,vendor_label_name, pv.sku2,style,product_name,delivery_time,copy_field,bullet1,bullet2,bullet3,bullet4,bullet5,bullet6,bullet7,bullet8,bullet9,bullet10,bullet11,bullet12 from product_v pv, pricing_interface bpi where status_code = 'ACTV' and regular_master_variant in (2,1) and bpi.sku2 = pv.sku2 and bpi.product_type_id = pv.regular_master_variant"> <field name="current_price" column="price_1"/> <field name="regular_price" column="price_2"/> <field name="other_price" column="price_3"/> <field name="product_id" column="product_id"/> <field name="id" column="id"/> <field name="vendor_label_name" column="vendor_label_name"/> <field name="sku2" column="sku2"/> <field name="style" column="style"/> <field name="product_name" column="product_name"/> <field name="delivery_time" column="delivery_time"/> <field name="copy_field" column="copy_field"/> <field name="bullet1" column="bullet1"/> <field name="bullet2" column="bullet2"/> <field name="bullet3" column="bullet3"/> <field name="bullet4" column="bullet4"/> <field name="bullet5" column="bullet5"/> <field name="bullet6" column="bullet6"/> <field name="bullet7" column="bullet7"/> <field name="bullet8" column="bullet8"/> <field name="bullet9" column="bullet9"/> <field name="bullet10" column="bullet10"/> <field name="bullet11" column="bullet11"/> <field name="bullet12" column="bullet12"/> <entity name="section_product" pk="SECTION_ID" query="select section_title from section s, section_product sp where sp.section_id = s.section_id and sp.product_id='${product.product_id}'"> <field column="SECTION_TITLE" name="sections"/> </entity> <entity name="color_product" pk="PRODUCT_ID" query="select aev.enum_value from product_attribute_enum pae,attribute_enum_value aev, sub_product sp where pae.product_id = sp.sub_product_id and pae.attribute_type_id = aev.attribute_type_id and pae.attribute_value_id = aev.attribute_value_id and pae.attribute_type_id = 107 and sp.master_product_id ='${product.product_id}'"> <field column="ENUM_VALUE" name="colors"/> </entity> <entity name="size_product" pk="PRODUCT_ID" query="select aev.enum_value from product_attribute_enum pae,attribute_enum_value aev, sub_product sp where pae.product_id = sp.sub_product_id and pae.attribute_type_id = aev.attribute_type_id and pae.attribute_value_id = aev.attribute_value_id and pae.attribute_type_id = 108 and sp.master_product_id ='${product.product_id}'"> <field column="ENUM_VALUE" name="sizes"/> </entity> </entity> </document> e.g. solr ignores the <field tags This seems like very odd behavior to me, so I'm inclined to start talking about my environment. I'm running on an opensuse 11.2 laptop, 64 bit. 4gb ram. JDK 1.6, both JDK and IcedTea The behavior seems very odd. I did find the web based luke interface - /solr/admin/luke and this confirmed the same. Thanks, John On Mon, Mar 8, 2010 at 3:48 PM, John Ament <my.repr...@gmail.com> wrote: > All > > It seems like my issue is simply on the concept of child entities. > > I had to add a second table to my query to pull pricing info. At first, I > was putting it in a separate entity. Didn't work, even though I added the > fields. > > When I rewrote my query as > > <entity name="product" query="select price_1 as current_price, price_2 as > regular_price, price_3 as other_price, pv.product_id, pv.product_id as > id,vendor_label_name, > pv.sku2,style,product_name,delivery_time,copy_field,bullet1,bullet2,bullet3,bullet4,bullet5,bullet6,bullet7,bullet8,bullet9,bullet10,bullet11,bullet12 > from product_v pv, pricing_interface bpi where status_code = 'ACTV' and > regular_master_variant in (2,1) and bpi.sku2 = pv.sku2 and > bpi.product_type_id = pv.regular_master_variant"> > > It loaded. > > I'm wondering if there's something I have to activate to make child > entities work? > > Thanks, > > John > > > On Mon, Mar 8, 2010 at 12:17 PM, John Ament <my.repr...@gmail.com> wrote: > >> Ok - downloaded the binary off of google code and it's loading. The 3 >> child entities do not appear as I had suspected. >> >> Thanks, >> >> John >> >> >> On Mon, Mar 8, 2010 at 12:12 PM, John Ament <my.repr...@gmail.com> wrote: >> >>> The issue's not about indexing, the issue's about storage. It seems like >>> the fields (sections, colors, sizes) are all not being stored, even though >>> store=true. >>> >>> I could not get Luke to work, no. The webstart just hangs at downloading >>> 0%. >>> >>> Thanks, >>> >>> John >>> >>> >>> On Mon, Mar 8, 2010 at 12:06 PM, Erick Erickson <erickerick...@gmail.com >>> > wrote: >>> >>>> Sorry, won't be able to really look till tonight. Did you try Luke? What >>>> did >>>> it >>>> show? >>>> >>>> One thing I did notice though... >>>> >>>> field name="sections" type="string" indexed="true" stored="true" >>>> multiValued="true"/> >>>> >>>> string types are not analyzed, so the entire input is indexed as >>>> a single token. You might want "text" here.... >>>> >>>> Erick >>>> >>>> On Mon, Mar 8, 2010 at 11:37 AM, John Ament <my.repr...@gmail.com> >>>> wrote: >>>> >>>> > Erick, >>>> > >>>> > I'm sorry, but it's not helping much. I don't see anything on the >>>> admin >>>> > screen that allows me to browse my index. Even using Luke, my >>>> assumption >>>> > is >>>> > that it's not loading correctly in the index. What parameters can I >>>> change >>>> > in the logs to make it print out more information? I want to see what >>>> the >>>> > query is returning I guess. >>>> > >>>> > Thanks, >>>> > >>>> > John >>>> > >>>> > On Mon, Mar 8, 2010 at 11:23 AM, Erick Erickson < >>>> erickerick...@gmail.com >>>> > >wrote: >>>> > >>>> > > Try http://<localhost address and port>/solr/admin. You'll see a >>>> bunch >>>> > > of links that'll allow you to examine many aspects of your >>>> installation. >>>> > > >>>> > > Additionally, get a copy of Luke (Google Lucene Luke) and point it >>>> at >>>> > > your index for a detailed look at the index. >>>> > > >>>> > > Finally, the SOLR log file might give you some clues... >>>> > > >>>> > > HTH >>>> > > Erick >>>> > > >>>> > > On Mon, Mar 8, 2010 at 10:49 AM, John Ament <my.repr...@gmail.com> >>>> > wrote: >>>> > > >>>> > > > Where would I see this? I do believe the fields are not ending up >>>> in >>>> > the >>>> > > > index. >>>> > > > >>>> > > > Thanks >>>> > > > >>>> > > > John >>>> > > > >>>> > > > On Mon, Mar 8, 2010 at 10:34 AM, Erick Erickson < >>>> > erickerick...@gmail.com >>>> > > > >wrote: >>>> > > > >>>> > > > > What does the solr admin page show you is actually in your >>>> index? >>>> > > > > >>>> > > > > Luke will also help. >>>> > > > > >>>> > > > > Erick >>>> > > > > >>>> > > > > On Mon, Mar 8, 2010 at 10:06 AM, John Ament < >>>> my.repr...@gmail.com> >>>> > > > wrote: >>>> > > > > >>>> > > > > > All, >>>> > > > > > >>>> > > > > > So I think I have my first issue figured out, need to add >>>> terms to >>>> > > the >>>> > > > > > default search. That's fine. >>>> > > > > > >>>> > > > > > New issue is that I'm trying to load child entities in with my >>>> > > entity. >>>> > > > > > >>>> > > > > > I added the appropriate fields to solrconfig.xml >>>> > > > > > >>>> > > > > > <field name="sections" type="string" indexed="true" >>>> > stored="true" >>>> > > > > > multiValued="true"/> >>>> > > > > > <field name="colors" type="string" indexed="true" >>>> stored="true" >>>> > > > > > multiValued="true"/> >>>> > > > > > <field name="sizes" type="string" indexed="true" >>>> stored="true" >>>> > > > > > multiValued="true"/> >>>> > > > > > >>>> > > > > > And I updated my document to match >>>> > > > > > >>>> > > > > > <document> >>>> > > > > > <entity name="product" query="select product_id, >>>> product_id >>>> > as >>>> > > > > > id,vendor_label_name, sku2, >>>> > > > > style,product_name,delivery_time,regular_price, >>>> > > > > > copy_field,bullet1,bullet2,bullet3,bullet4,bullet5,bullet6, >>>> > > > > > bullet7,bullet8,bullet9,bullet10,bullet11,bullet12 from >>>> product_v >>>> > > where >>>> > > > > > status_code = 'ACTV' and regular_master_variant in (2,1)"> >>>> > > > > > <entity name="section_product" query="select >>>> > section_title >>>> > > > as >>>> > > > > > sections from section s, section_product sp where >>>> sp.section_id = >>>> > > > > > s.section_id and sp.product_id='${product.product_id}'"/> >>>> > > > > > <entity name="color_product" query="select distinct >>>> > > > > > aev.enum_value as colors from product_attribute_enum >>>> > > > > > pae,attribute_enum_value aev, sub_product sp where >>>> pae.product_id = >>>> > > > > > sp.sub_product_id and pae.attribute_type_id = >>>> aev.attribute_type_id >>>> > > and >>>> > > > > > pae.attribute_value_id = aev.attribute_value_id and >>>> > > > pae.attribute_type_id >>>> > > > > = >>>> > > > > > 107 and sp.master_product_id = '${product.product_id}'"/> >>>> > > > > > <entity name="size_product" query="select distinct >>>> > > > > > aev.enum_value as sizes from product_attribute_enum >>>> > > > > > pae,attribute_enum_value >>>> > > > > > aev, sub_product sp where pae.product_id = sp.sub_product_id >>>> and >>>> > > > > > pae.attribute_type_id = aev.attribute_type_id and >>>> > > > pae.attribute_value_id >>>> > > > > = >>>> > > > > > aev.attribute_value_id and pae.attribute_type_id = 108 and >>>> > > > > > sp.master_product_id = '${product.product_id}'"/> >>>> > > > > > </entity> >>>> > > > > > </document> >>>> > > > > > >>>> > > > > > So my expectation is that there will be 3 new fields >>>> associated >>>> > with >>>> > > it >>>> > > > > > that >>>> > > > > > are multivalued: sizes, colors, and sections. >>>> > > > > > >>>> > > > > > The full-import seems to work correctly. I get the >>>> appropriate >>>> > > number >>>> > > > of >>>> > > > > > documents in my searches. However, sizes, colors and sections >>>> all >>>> > > come >>>> > > > > up >>>> > > > > > null (well, I should say they don't come up when I search for >>>> > them). >>>> > > > > > >>>> > > > > > Any ideas on why it won't load these 3 child entities? >>>> > > > > > >>>> > > > > > Thanks! >>>> > > > > > >>>> > > > > > John >>>> > > > > > >>>> > > > > >>>> > > > >>>> > > >>>> > >>>> >>> >>> >> >