Yii Framework Forum: OpenSearch in Yii Site - No trimming? - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

OpenSearch in Yii Site - No trimming? Rate Topic: -----

#1 User is offline   Trejder 

  • Master Member
  • PipPipPipPip
  • Yii
  • Group: Members
  • Posts: 1,193
  • Joined: 06-October 10
  • Location:Southern Poland

Posted 30 December 2010 - 07:45 AM

Hi there,

OpenSearch for this site works like a charm, but has anyone else noticed that question (query) passed to it isn't trimmed of white spaces?

Just pasted in my Firefox to Yii API Search a "CActiveDataProvider ". Got result:

Quote

Did you mean: cactivedataprovider
Your search - CActiveDataProvider - did not match any documents.

(link's text for did you mean trimmed of last space, but actual link, not - i.e.: http://www.yiiframew...ype=api-suggest)

When clicking did you mean link, you (obvious) also get no results.Of course, when pasting (typing) "CActiveDataProvider" (without space at the end) everything works fine and proper document is found.
Proud Cookbook author, though still learning powerful Yii! :] See my generic profile for more information. Cheers!
0

#2 User is offline   GOsha 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 24
  • Joined: 09-August 10
  • Location:Europe, Belarus, Brest

Posted 06 January 2011 - 03:35 AM

OpenSearch realizes searching from native Yii site search. There is no trimming on site. If there is a trimming OpenSearch will use it.

And to work with OpenSearch more rapidly it will be good to get straight redirect if there is the only result found. But it`s a question to site too.
0

#3 User is offline   Trejder 

  • Master Member
  • PipPipPipPip
  • Yii
  • Group: Members
  • Posts: 1,193
  • Joined: 06-October 10
  • Location:Southern Poland

Posted 06 January 2011 - 05:24 PM

Thanks for your answers, GOsha,

View PostGOsha, on 06 January 2011 - 03:35 AM, said:

OpenSearch realizes searching from native Yii site search. There is no trimming on site. If there is a trimming OpenSearch will use it.

And to work with OpenSearch more rapidly it will be good to get straight redirect if there is the only result found. But it`s a question to site too.

Well then, the only hope is in that page moderators / admin will agree with us and consider above mentioned modifications! :]

Will you open up a bug ticket or post in Feature Request forum (or both) or should I do it?

Cheers,
Trejder
Proud Cookbook author, though still learning powerful Yii! :] See my generic profile for more information. Cheers!
0

#4 User is offline   GOsha 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 24
  • Joined: 09-August 10
  • Location:Europe, Belarus, Brest

Posted 06 January 2011 - 06:24 PM

View PostTrejder, on 06 January 2011 - 05:24 PM, said:

Will you open up a bug ticket or post in Feature Request forum (or both) or should I do it?

Would you please do it?
0

#5 User is offline   wei 

  • Advanced Member
  • Yii
  • Group: Yii Dev Team
  • Posts: 147
  • Joined: 04-October 08

Posted 06 January 2011 - 08:38 PM

Fixed, thanks!
1

#6 User is offline   Trejder 

  • Master Member
  • PipPipPipPip
  • Yii
  • Group: Members
  • Posts: 1,193
  • Joined: 06-October 10
  • Location:Southern Poland

Posted 07 January 2011 - 03:56 AM

View PostGOsha, on 06 January 2011 - 06:24 PM, said:

ould you please do it?

As you may see, wei was faster than me! :]
Proud Cookbook author, though still learning powerful Yii! :] See my generic profile for more information. Cheers!
0

#7 User is offline   Trejder 

  • Master Member
  • PipPipPipPip
  • Yii
  • Group: Members
  • Posts: 1,193
  • Joined: 06-October 10
  • Location:Southern Poland

Posted 07 January 2011 - 04:00 AM

View Postwei, on 06 January 2011 - 08:38 PM, said:

Fixed, thanks!

No, it is we, who are thanks giving for this! :]

BTW: Wei, I can confirm that trimming is working fine. But what about second proposition raised by GOsha? I mean - is it technically possible that if search returns only one result that page would be auto-redirected to that result?

For example, if you put "CTreeView.getClientOptions()" into search, you should receive only one result - that is method you are looking for. Is it possible that page would redirect automatically to this topic, instead of displaying it as only one search result?

EDIT: Just noticed something strange. If you enter exactly "CTreeView.getClientOptions()" into Firefox (OpenSearch) this phrase will be searched (and currently returned as only one search result). But if you enter the very same phrase directly to search box that is on every page in a menu, then you will receive that no results were found. Odd...

This post has been edited by Trejder: 07 January 2011 - 04:02 AM

Proud Cookbook author, though still learning powerful Yii! :] See my generic profile for more information. Cheers!
0

#8 User is offline   wei 

  • Advanced Member
  • Yii
  • Group: Yii Dev Team
  • Posts: 147
  • Joined: 04-October 08

Posted 10 January 2011 - 06:29 PM

@Trejder do you still have the urls of the search pages?

I see http://www.yiiframew...tClientOptions() (which points back here)
0

#9 User is offline   wei 

  • Advanced Member
  • Yii
  • Group: Yii Dev Team
  • Posts: 147
  • Joined: 04-October 08

Posted 10 January 2011 - 06:30 PM

Auto redirect if there is only 1 result can be done, but not sure if that is a reasonable experience for the user.
0

#10 User is offline   Maurizio Domba Cerin 

  • Yii - Yesss It Is !!!
  • Yii
  • Group: Yii Dev Team
  • Posts: 4,340
  • Joined: 12-October 09
  • Location:Croatia

Posted 11 January 2011 - 02:28 AM

The open search is divided in "Yii api search" and "Yii site search"

In "Yii api search" if there is only one result... would be usefull if the result would be shown without additional click...
Find more about me.... btw. Do you know your WAN IP?
0

#11 User is offline   GOsha 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 24
  • Joined: 09-August 10
  • Location:Europe, Belarus, Brest

Posted 11 January 2011 - 05:27 AM

View Postwei, on 10 January 2011 - 06:30 PM, said:

Auto redirect if there is only 1 result can be done, but not sure if that is a reasonable experience for the user.

As designed OpenSearch must give instant access to information directly from browser`s searchbar. But all browsers except IE not supports pointig result urls. Autosuggestion works perfectly, and once clicked expects 1 result in most cases. That`s why user don`t need to do additional click to see desired option. And this situation little noizing mind.
This redirect will be very useful for api searchers and must do working process more fast and smooth.
0

#12 User is offline   RusAlex 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 54
  • Joined: 23-August 10

Posted 11 January 2011 - 08:19 AM

Yes, i want this feature. Every time when i want to find a documentation for a method, i need to make one additional click. I hate that.
0

#13 User is offline   Trejder 

  • Master Member
  • PipPipPipPip
  • Yii
  • Group: Members
  • Posts: 1,193
  • Joined: 06-October 10
  • Location:Southern Poland

Posted 12 January 2011 - 03:43 AM

View Postwei, on 10 January 2011 - 06:29 PM, said:

@Trejder do you still have the urls of the search pages?

I see http://www.yiiframew...tClientOptions() (which points back here)

Yes, no I can confirm that it is working as it is expected and as you wrote it. Maybe I missed something when testing / reporting that odd behaviour few days ago.
Proud Cookbook author, though still learning powerful Yii! :] See my generic profile for more information. Cheers!
0

#14 User is offline   Trejder 

  • Master Member
  • PipPipPipPip
  • Yii
  • Group: Members
  • Posts: 1,193
  • Joined: 06-October 10
  • Location:Southern Poland

Posted 12 January 2011 - 03:45 AM

View Postwei, on 10 January 2011 - 06:30 PM, said:

Auto redirect if there is only 1 result can be done, but not sure if that is a reasonable experience for the user.

View Postmdomba, on 11 January 2011 - 02:28 AM, said:

In "Yii api search" if there is only one result... would be usefull if the result would be shown without additional click...

I agree with others. This should be implemented. I don't see any reason for requiring user to do another click - if (and only if) there is only one search result.
Proud Cookbook author, though still learning powerful Yii! :] See my generic profile for more information. Cheers!
0

#15 User is offline   wei 

  • Advanced Member
  • Yii
  • Group: Yii Dev Team
  • Posts: 147
  • Joined: 04-October 08

Posted 12 January 2011 - 07:49 PM

Ok, so to be clear, if in api search, redirect to the result if only 1 result?
0

#16 User is offline   samdark 

  • Having fun
  • Yii
  • Group: Yii Dev Team
  • Posts: 3,372
  • Joined: 17-January 09
  • Location:Russia

Posted 12 January 2011 - 08:28 PM

Yes.
Yii 1.1 Application Development Cookbook

Enjoying Yii? Star us at github: 1.1 and 2.0.
0

#17 User is offline   wei 

  • Advanced Member
  • Yii
  • Group: Yii Dev Team
  • Posts: 147
  • Joined: 04-October 08

Posted 14 January 2011 - 04:54 AM

Done. Let us know if there are other search problems or suggestions.
1

#18 User is offline   Trejder 

  • Master Member
  • PipPipPipPip
  • Yii
  • Group: Members
  • Posts: 1,193
  • Joined: 06-October 10
  • Location:Southern Poland

Posted 14 January 2011 - 05:00 AM

Works like a charm! :]
Proud Cookbook author, though still learning powerful Yii! :] See my generic profile for more information. Cheers!
0

#19 User is offline   GOsha 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 24
  • Joined: 09-August 10
  • Location:Europe, Belarus, Brest

Posted 14 January 2011 - 07:30 AM

YES! It works fine!
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users