Hi,

I've created an index from three data sources: faq articles, forum
posts, and customer orders (sound strange?).

I've tagged each item with an "item_type" field (Keyword - either "faq",
"forums", or "orders"), as well as the item_id as a Keyword, the title
as Text, and the content as Unstored).  Additionally, all orders have an
extra Keyword field that carries the customer_id related to that order.

I'd like to have our customers be able to do text queries against all
sets of data, but limit the orders data returned to those carrying their
customer_id (hence the customer_id Keyword field for all orders).

Two questions come up.

First, how do I construct the query.  It seems to me I need to have
nested subqueries like:

words + (item_type:faq item_type:forums (item_type:orders +
customer_id:$customer_id) )

Is that the correct approach?  I don't even know if it's possible.

The second relates to having tracking numbers in the orders such as
"1Z3240230408".  For this, I've changed the default Analyzer to
TextNum_CaseInsensitive for both indexing and querying.  Is that correct?

Thanks,
-- 
Drew Bertola

-------------------------------------------------
*   PHP/LAMP Consultant, ZCE-1000               *
*                                               *
*   Tel: 408-966-6671                           *
*                                               *
*   current resume:                             *
*   http://drewb.com/blog/about/resume/         *
-------------------------------------------------

Reply via email to