Re: DIH for taxonomy faceting in Lucid webcast

2010-12-30 Thread Chris Hostetter

: > : "NonFic/Science", how do I turn that into "0/NonFic"
: > & 
: > : "1/NonFic/Science" using the DIH?
: > 
: > I don't have any specific suggestions for you -- i've never
...
: Thanks Chris.
: 
: What did you use to generate those encodings if not DIH?

I've used this gereral approach several times -- in most of them i had 
other people to write the code for me once i spec'ed it out, and i don't 
know how they actually implemented it.

IN two specific cases i do know of: one used custom loader code that was 
part of the publishing system for the authoritative data store 
(essentially building the individual terms in SolrInputDocuments and 
sending them to solr via SolrJ) and the other case i was doing a really 
super simple ingestor that batch processed directories of XML files, and 
used XSLT to transform them into Solr's XML format (i think the category 
"breadcrumb" fields relied heavily on using  in conjunction 
with the "position()" function)


-Hoss


Re: DIH for taxonomy faceting in Lucid webcast

2010-12-23 Thread Lance Norskog
The DIH lets you code in Javascript- you can do anything.

On 12/23/10, Erick Erickson  wrote:
> SolrJ is often used when DIH doesn't do what you wish. Using SolrJ is
> really quite easy, but you're doing the DB queries yourself, often with
> the appropriate jdbc driver.
>
> Within DIH, the transformers, as Chris says, *might* work for you.
>
> Best
> Erick
>
> On Wed, Dec 22, 2010 at 6:16 PM, Andy  wrote:
>
>>
>> --- On Wed, 12/22/10, Chris Hostetter  wrote:
>>
>> > : 2) Once I have the fully spelled out category path such
>> > as
>> > : "NonFic/Science", how do I turn that into "0/NonFic"
>> > &
>> > : "1/NonFic/Science" using the DIH?
>> >
>> > I don't have any specific suggestions for you -- i've never
>> > tried it in
>> > DIH myself.  the ScriptTransformer might be able to
>> > help you out, but i'm
>> > not sure.
>>
>> Thanks Chris.
>>
>> What did you use to generate those encodings if not DIH?
>>
>>
>>
>>
>>
>


-- 
Lance Norskog
goks...@gmail.com


Re: DIH for taxonomy faceting in Lucid webcast

2010-12-23 Thread Erick Erickson
SolrJ is often used when DIH doesn't do what you wish. Using SolrJ is
really quite easy, but you're doing the DB queries yourself, often with
the appropriate jdbc driver.

Within DIH, the transformers, as Chris says, *might* work for you.

Best
Erick

On Wed, Dec 22, 2010 at 6:16 PM, Andy  wrote:

>
> --- On Wed, 12/22/10, Chris Hostetter  wrote:
>
> > : 2) Once I have the fully spelled out category path such
> > as
> > : "NonFic/Science", how do I turn that into "0/NonFic"
> > &
> > : "1/NonFic/Science" using the DIH?
> >
> > I don't have any specific suggestions for you -- i've never
> > tried it in
> > DIH myself.  the ScriptTransformer might be able to
> > help you out, but i'm
> > not sure.
>
> Thanks Chris.
>
> What did you use to generate those encodings if not DIH?
>
>
>
>
>


Re: DIH for taxonomy faceting in Lucid webcast

2010-12-22 Thread Andy

--- On Wed, 12/22/10, Chris Hostetter  wrote:

> : 2) Once I have the fully spelled out category path such
> as 
> : "NonFic/Science", how do I turn that into "0/NonFic"
> & 
> : "1/NonFic/Science" using the DIH?
> 
> I don't have any specific suggestions for you -- i've never
> tried it in 
> DIH myself.  the ScriptTransformer might be able to
> help you out, but i'm 
> not sure.

Thanks Chris.

What did you use to generate those encodings if not DIH?






Re: DIH for taxonomy faceting in Lucid webcast

2010-12-22 Thread Chris Hostetter
: 
: 1) My categories are stored in database as coded numbers instead of 
: fully spelled out names. For example I would have a category of "2/7" 
: and a lookup dictionary to convert "2/7" into "NonFic/Science". How do I 
: do such lookup in DIH?

My advice: don't.

I thought i mentioned this in that webcast, but if you've already got 
unique identifiers for your category names, keep using them in your 
index/facets, and then have your front end application resolve them into 
"pretty" category names.  it's usually just as easy to do apply the labels 
at query time as at index time, and if you do it at query time you can 
tweak the labels w/o reindexing.

: 2) Once I have the fully spelled out category path such as 
: "NonFic/Science", how do I turn that into "0/NonFic" & 
: "1/NonFic/Science" using the DIH?

I don't have any specific suggestions for you -- i've never tried it in 
DIH myself.  the ScriptTransformer might be able to help you out, but i'm 
not sure.

: 3) Some of my categories are multi-words containing whitespaces, such as 
: "Computer Science" and "Functional Programming", so I'd have facet 
: values such as "2/NonFic/Computer Science/Functional Programming".  How 
: do I handle whitespaces in this case? Would filtering by fq still work?

a) it should if you use the {!raw} qparser
b) if you follow my advice in #1, it won't matter.



-Hoss


DIH for taxonomy faceting in Lucid webcast

2010-12-19 Thread Andy
Hi,

I watched the Lucid webcast:
http://www.lucidimagination.com/solutions/webcasts/faceting

It talks about encoding hierarchical categories to facilitate faceting. So a 
category "path" of "NonFic>Science" would be encoded as the multivalues 
"0/NonFic" & "1/NonFic/Science".

1) My categories are stored in database as coded numbers instead of fully 
spelled out names. For example I would have a category of "2/7" and a lookup 
dictionary to convert "2/7" into "NonFic/Science". How do I do such lookup in 
DIH?

2) Once I have the fully spelled out category path such as "NonFic/Science", 
how do I turn that into "0/NonFic" & "1/NonFic/Science" using the DIH?

3) Some of my categories are multi-words containing whitespaces, such as 
"Computer Science" and "Functional Programming", so I'd have facet values such 
as "2/NonFic/Computer Science/Functional Programming".  How do I handle 
whitespaces in this case? Would filtering by fq still work?

Thanks