You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by KishoreVeleti CoreObjects <ki...@coreobjects.com> on 2008/12/22 19:22:12 UTC

SOLR in PHP for my web application

Hi All,


I have a product to be developed with following main tables in it

1. Question table (Question_ID, Question_Title, Question_Description,
Question_Category, Question_creation_date are columns in this table)

2. My web site users can answer each question (Question_ID (foreign key to
above table, Question_Answer_ID (primary key to this table),
User_Answer_Description, Answered_Date)

A Question can hare more than one answer.

My requirement:

When users does a search I should be able to show the results if that search
term exists either in 

Question Title 

or Question Description 
or Question Category 
or Answer_description


I should return the results based on the latest answer or latest question

Suppose say if a term matches more than one answer_id BUT question_id is
same then I should return only one question though it matches more than one
answer_id. This is because I have to show only question in the UI (search
results page) with a link to view all Answers for this question

After findin the unique question ids from SOLR I need to fetch additional
data from the database no of times a question is viewed by users in search
results page, no of times a question full_details_page is viewed by the
user, no of times a question is appeared in the search_results page

###################

Technology:

###################
I am building the website using PHP 5 and My SQL 5 DB

Please let me know how I can index the data
What is the best PHP API I can use to get performance results
I may have around 10K users accessing the site at a time


-- 
View this message in context: http://www.nabble.com/SOLR-in-PHP-for-my-web-application-tp21132500p21132500.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: SOLR in PHP for my web application

Posted by Otis Gospodnetic <ot...@yahoo.com>.
Hi,

There is a Solr PHP client and I believe it only exists in Solr's JIRA system.  It's referenced from the Solr Wiki, too.


Otis --
Sematext -- http://sematext.com/ -- Lucene - Solr - Nutch



----- Original Message ----
> From: KishoreVeleti CoreObjects <ki...@coreobjects.com>
> To: solr-user@lucene.apache.org
> Sent: Monday, December 22, 2008 1:22:12 PM
> Subject: SOLR in PHP for my web application
> 
> 
> Hi All,
> 
> 
> I have a product to be developed with following main tables in it
> 
> 1. Question table (Question_ID, Question_Title, Question_Description,
> Question_Category, Question_creation_date are columns in this table)
> 
> 2. My web site users can answer each question (Question_ID (foreign key to
> above table, Question_Answer_ID (primary key to this table),
> User_Answer_Description, Answered_Date)
> 
> A Question can hare more than one answer.
> 
> My requirement:
> 
> When users does a search I should be able to show the results if that search
> term exists either in 
> 
> Question Title 
> 
> or Question Description 
> or Question Category 
> or Answer_description
> 
> 
> I should return the results based on the latest answer or latest question
> 
> Suppose say if a term matches more than one answer_id BUT question_id is
> same then I should return only one question though it matches more than one
> answer_id. This is because I have to show only question in the UI (search
> results page) with a link to view all Answers for this question
> 
> After findin the unique question ids from SOLR I need to fetch additional
> data from the database no of times a question is viewed by users in search
> results page, no of times a question full_details_page is viewed by the
> user, no of times a question is appeared in the search_results page
> 
> ###################
> 
> Technology:
> 
> ###################
> I am building the website using PHP 5 and My SQL 5 DB
> 
> Please let me know how I can index the data
> What is the best PHP API I can use to get performance results
> I may have around 10K users accessing the site at a time
> 
> 
> -- 
> View this message in context: 
> http://www.nabble.com/SOLR-in-PHP-for-my-web-application-tp21132500p21132500.html
> Sent from the Solr - User mailing list archive at Nabble.com.


Re: SOLR in PHP for my web application

Posted by Shalin Shekhar Mangar <sh...@gmail.com>.
On Mon, Dec 22, 2008 at 11:52 PM, KishoreVeleti CoreObjects <
kishorev@coreobjects.com> wrote:

>
> Suppose say if a term matches more than one answer_id BUT question_id is
> same then I should return only one question though it matches more than one
> answer_id. This is because I have to show only question in the UI (search
> results page) with a link to view all Answers for this question


De-normalize the tables into a single Solr schema. So your schema.xml will
have the question_id, question_title, question_description,
question_category and a multi valued field for answer_description.


> After findin the unique question ids from SOLR I need to fetch additional
> data from the database no of times a question is viewed by users in search
> results page, no of times a question full_details_page is viewed by the
> user, no of times a question is appeared in the search_results page
>

You can also store enough information in Solr to display the search results
page. You may not need to hit MySQL for every question_id returned in the
results.



> --
> View this message in context:
> http://www.nabble.com/SOLR-in-PHP-for-my-web-application-tp21132500p21132500.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>



-- 
Regards,
Shalin Shekhar Mangar.