# Chef Solr/search issue

**URL:** <https://discourse.chef.io/t/chef-solr-search-issue/2018>\
**Category:** Chef Infra (archive)\
**Created:** [August 11, 2011, 5:57pm UTC](https://discourse.chef.io/t/chef-solr-search-issue/2018 "2011-08-11T17:57:19Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Madhurranjan\_Mohaan](https://avatars.discourse-cdn.com/v4/letter/m/5f9b8f/32.png) [@Madhurranjan\_Mohaan](https://discourse.chef.io/u/Madhurranjan_Mohaan)\
**Post date:** [August 11, 2011, 5:57pm UTC](https://discourse.chef.io/t/chef-solr-search-issue/2018/1 "2011-08-11T17:57:19Z")

</div>

Hi All,

We have been running a single chef-server for a while . A couple of weeks back  
the server restarted by mistake and we had an issue with the database( The Db  
was mounted on NFS and on restarting, it didn’t turn up). In the meantime the  
server started and we didn’t find any data. Later we restored all of that .

However,ever since , our “chef search” is behaving abnormally . We have done a  
knife index rebuild a few times and the results on command line show that they  
are successful but knife search doesn’t show this.

Further, we also ran /usr/sbin/rabbitmqctl list\_queues -p /chef which returns a  
lot of queues.

The chef-solr logs don’t show any error.

Abnormal behavior example:  
knife search node “_:_” gives the right output but when we do a "knife search  
node “role:core\_role” , it doesn’t show us the nodes correctly. (Earlier it  
used to).

chef-expanderctl queue-depth  
total messages: 0  
average queue depth: 0.0  
max queue depth: 0  
min queue depth: 0

The no. of documents that it has indexed seem to be fine when we look through  
the GUI but search doesn’t work fine. Can you please suggest what we should do  
?

Thanks

Madhurranjan

---

<div class="post-metadata">

**Author:** ![Matthew\_Kent3](https://avatars.discourse-cdn.com/v4/letter/m/77aa72/32.png) [@Matthew\_Kent3](https://discourse.chef.io/u/Matthew_Kent3)\
**Post date:** [August 11, 2011, 9:48pm UTC](https://discourse.chef.io/t/chef-solr-search-issue/2018/2 "2011-08-11T21:48:56Z")

</div>

> However,ever since , our "chef search" is behaving abnormally . We have done a  
> knife index rebuild a few times and the results on command line show that they  
> are successful but knife search doesn't show this.

Shot in the dark but take a look at  
[http://tickets.opscode.com/browse/CHEF-2346](http://tickets.opscode.com/browse/CHEF-2346) tripped me up today.

If that fixes it please leave feedback on the ticket.

--  
Matthew Kent | [http://magoazul.com](http://magoazul.com)

---

<div class="post-metadata">

**Author:** ![Madhurranjan\_Mohaan](https://avatars.discourse-cdn.com/v4/letter/m/5f9b8f/32.png) [@Madhurranjan\_Mohaan](https://discourse.chef.io/u/Madhurranjan_Mohaan)\
**Post date:** [August 12, 2011, 11:41am UTC](https://discourse.chef.io/t/chef-solr-search-issue/2018/3 "2011-08-12T11:41:19Z")

</div>

Hello Matthew,

That worked! Thanks!! We had 54k+ with the 'awk' script. Bumped up the value  
of maxFieldLength to 100000 . Question - What should be the optimal setting  
? As we add new nodes and this number shoots up , should we periodically  
bump up this value in solrconfig.xml as well ?

Thanks  
Madhurranjan

On Fri, Aug 12, 2011 at 3:18 AM, Matthew Kent \<[mkent+chef-users@magoazul.com](mailto:mkent+chef-users@magoazul.com)

> wrote:

> > However,ever since , our "chef search" is behaving abnormally . We have  
> > done a  
> > knife index rebuild a few times and the results on command line show  
> > that they  
> > are successful but knife search doesn't show this.
> 
> Shot in the dark but take a look at  
> [http://tickets.opscode.com/browse/CHEF-2346](http://tickets.opscode.com/browse/CHEF-2346) tripped me up today.
> 
> If that fixes it please leave feedback on the ticket.
> 
> --  
> Matthew Kent | [http://magoazul.com](http://magoazul.com)

---

<div class="post-metadata">

**Author:** ![Matthew\_Kent3](https://avatars.discourse-cdn.com/v4/letter/m/77aa72/32.png) [@Matthew\_Kent3](https://discourse.chef.io/u/Matthew_Kent3)\
**Post date:** [August 12, 2011, 5:40pm UTC](https://discourse.chef.io/t/chef-solr-search-issue/2018/4 "2011-08-12T17:40:30Z")

</div>

On Fri, Aug 12, 2011 at 4:41 AM, Madhurranjan Mohaan  
[maadhuuranjan.m@gmail.com](mailto:maadhuuranjan.m@gmail.com) wrote:

> Hello Matthew,  
> That worked! Thanks!! We had 54k+ with the 'awk' script. Bumped up the value  
> of maxFieldLength to 100000 . Question - What should be the optimal setting  
> ? As we add new nodes and this number shoots up , should we periodically  
> bump up this value in solrconfig.xml as well ?

Great!

I'm not sure what the optimal size is, but I've added some notes to  
[http://tickets.opscode.com/browse/CHEF-2346](http://tickets.opscode.com/browse/CHEF-2346) and will ask for feedback  
on chef-dev@.

My understanding is that I don't think you'll have to adjust this so  
long as your node data fits within the limit, this shouldn't change  
that much unless you are adding disks, ips, etc to the server.

- Matt
