eZ Community » Forums » Developer » eZ Find
expandshrink

eZ Find

eZ Find

Monday 06 February 2012 3:40:59 pm - 5 replies

Hello,

I have an issue with eZ Find that I hope someone could help me with.

We are searching articles that have an object relation to another object.

It seem to work fine up to some letters. It works up to 13 letters, but wont the search wont work after that.

The object it refers to has:

* Name, Text line (no limit)

* Code, Text line (no limit)

Its the name we are searching for and it works up to 13 characters, at 14 there is 0 results.

So if the name exceeds 13 characters its not showing up in the results.

This feels like a setting issue. Will eZ Find only store up to 13 characters for a Text line and can I change that somewhere or does anyone else have any tips?

Best regards,

Håkan Bergman

Tuesday 07 February 2012 10:30:50 am

You should use eZP debug info and the solr console to find out what is going on: how the related-object filed is stored in the solr index and what is the search request sent by ezfind.

Afaik, there is no limit on string length enforced anywhere by ezfind itself...

Wednesday 08 February 2012 10:47:04 am

Thank you for your reply Gaetano.

It could be a correct search now when I am looking at the Solr admin.

But I am getting too many results, so I have been looking at the manual for eZ Find.

We are using 2.3 by the way.

 

I get this to work:

{def $searchfilter = array(concat('article/name: , $search_text))}

I am using "" around $search_text to get an explicit results, and this works as it should.

But this is not what I want, we have an object relation, called positions, IE:

{def $searchfilter = array(concat('article/related_positions: ,?))}

I've tested object_id, node_id, name, but can't get it to work.

Our article have an object relation and is pointing to this position in the system.

 

My problem was that I got results from other stuff and I need to filter down to just this position. But I cant get it to work.

 

Any help/tips? happy.gif Emoticon

 

Best regards,

Håkan Bergman

Modified on Wednesday 08 February 2012 10:48:35 am by Håkan Bergman

Wednesday 08 February 2012 4:47:04 pm

I am unsure of the object relation so I added a CLI script to a cronjob and get them in proper text instead.

It seem to work if I add a text line with related_positions_text and use (position, position, position) and search from there. However, it works if I call the exact name. Like CEO returns articles tagged as CEO. But I cant seem to find how to return CEO with the phrase CE. 

Now CEO is only an example, we use Swedish positions with longer names.

But its the same principle, if I dont search the whole word nothing shows up.

 

article/related_positions_text: ", $search_text

The examples for 2.3 is just rating[1 to 10] etc. But how do I make LIKE?

I would like to have all positions LIKE $search_text. Is that possible and how do I do that?

Best regards,

Håkan Bergman

Thursday 09 February 2012 9:54:02 am

Invested some more time into this, and saw that adding wildcard works.

But now I have an interesting error.

 

We have a position called "Ekonomiassistent" and we are using AJAX search.

When I type up to "ekonomiassist" it returns correctly.

If I keep typing, "ekonomiassiste", "ekonomiassisten", "ekonomiassistent", I get 0 answers.

Now im back to my 13 character issue and I have no clue how to use Solr admin to investigate this sad.gif Emoticon

 

Hope someone have an input on this.

Best regards,

Håkan Bergman

Friday 10 February 2012 11:09:53 am

Think I pinpointed the problem, I cant get the wildcard to work.

This is a test search:

affärsengelsk

Attribute

Type

Value

0 string 'or'
1 array Array(4)
2 array Array(4)
3 array Array(4)
4 array Array(4)

 

Attribute

Type

Value

0 string 'or'
1 string 'article/active:true'
2 string 'article/show_on_web:true'
3 string 'article/related_positions_text: affärsengelsk*'

 

Attribute

Type

Value

0 string 'or'
1 string 'article/active:true'
2 string 'article/show_on_web:true'
3 string 'article/related_positions_text: affärsengelsk'

 

Attribute

Type

Value

0 string 'or'
1 string 'article/active:true'
2 string 'article/show_on_web:true'
3 string 'article/name: affärsengelsk*'

 

Attribute

Type

Value

0 string 'or'
1 string 'article/active:true'
2 string 'article/show_on_web:true'
3 string 'article/name: affärsengelsk'

 
If I change the word to "Affärsengelska" I get several hits because I have words with that phrase. So it looks like the wildcard is not in effect. 

ezfind.ini (extension/ezfind/settings)

DefaultSearchHandler=heuristic

site.ini.append.php (settings/override)

EnableWildcard=true

MinCharacterWildcard=3

I am using 2.3 but when I search in solr Admin I get:

select?indent=on&version=2.2

So am I using 2.2 and do I need to use a newer version to make this work?

 

Best regards,

Håkan Bergman

Modified on Friday 10 February 2012 11:11:56 am by Håkan Bergman

expandshrink

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu

Proudly Developed with from