Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8200249
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T06:22:43+00:00 2026-06-07T06:22:43+00:00

I am trying to find documents I have in my solr instance through php.

  • 0

I am trying to find documents I have in my solr instance through php. When I go to my solr admin and do a search I get the following:

  <response>
    <lst name="responseHeader">
    <int name="status">0</int>
<int name="QTime">443</int><lst name="params">
<str name="indent">on</str><str name="start">0</str>
<str name="q">*:*</str><str name="rows">10</str>
<str name="version">2.2</str></lst></lst>
<result name="response" numFound="4" start="0">
<doc>
<str name="description">An Aweomse dish</str>
<arr name="ingredients"><str>Radish</str><str>Beans</str><str>Curry</str></arr>
<str name="name">Alfredo Chehse</str>
<str name="recipe_id">10</str><str name="thumbnail">123343f342</str>
</doc>
<doc>
<str name="description">An Aweomse dish</str>
<arr name="ingredients"><str>Radish</str><str>Beans</str>
<str>Curry</str></arr><str name="name">Alfredo Chehse</str>
<str name="recipe_id">11</str><str name="thumbnail">123343f342</str>
</doc>
</result>
</response>

So I know the data is in there. Now in my PHP I have this:

$query = new SolrQuery();

        $query->setQuery('Radish');

        $query->setStart(0);

        $query->setRows(50);

        $query->addField('ingredients') -> addField('name');

        $query_response = $client->query($query);

        $query_response->setParseMode(SolrQueryResponse::PARSE_SOLR_DOC);

        $response = $query_response->getResponse();

        print_r($response);

But I alway get an empty result set:

SolrObject Object
(

 [responseHeader] => SolrObject Object
        (
            [status] => 0
            [QTime] => 1
            [params] => SolrObject Object
                (
                    [fl] => ingredients,name
                    [indent] => on
                    [start] => 0
                    [q] => radish
                    [wt] => xml
                    [rows] => 50
                    [version] => 2.2
                )

        )

    [response] => SolrObject Object
        (
            [numFound] => 0
            [start] => 0
            [docs] => 
        )

My question is why is my results always empty no matter what I search for?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T06:22:44+00:00Added an answer on June 7, 2026 at 6:22 am

    Is ingredients an indexed field?

    Do you have a case insensitive fulltext index field for each document?

    Try this

    $query->setQuery('ingredients:*Radish*');
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to search through many documents and find all instances where an html
I am trying to find in a collection all of the documents that have
I have a fairly large script and am trying to find out, why $(document).on(
Trying to find a good name for a method swapping each coordinate X and
I have been trying to get a simple spider to run with scrapy, but
I got these documents: users -> id, name, friendList (_id, name), createdOn I have
I'm trying to use mongodb with PHP. For that, I have created a MongoHQ
I have posted my 2 source files. I've been trying to find out whats
I have a collection of documents and I'm trying to pull the dates out
I'm trying to get my ad hoc build distributed but have started experiencing problems.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.