Hello Conrad,
I just tried creating an event called 'test phone' in the UI and searching
for the word 'phone' via the API and came up with the appropriate entry, so
I'm thinking that this may be a misunderstanding as to the appropriate
argument value for setQuery()?
What's the value of $queryString in your example above? The setQuery()
method is used to set only the value of the 'q' query parameter-- for the
full text query (calling it 'setQ' would perhaps be more appropriate)
For debug purposes, you can use the following to see the full value of the
query URL generated for sending to the server:
echo $query->getQueryUrl() . "\n";
My code for doing the query follows this message. Please let me know if
this clears things up. We certainly could use some improvements in the
inline docs to make this more clear.
Cheers,
-Ryan
----
$cal = new Zend_Gdata_Calendar($client);
$query = $cal->newEventQuery();
$query->setUser('default');
$query->setVisibility('private');
$query->setProjection('full');
$query->setQuery('phone');
print $query->getQueryUrl() . "\n";
$feed = $cal->getCalendarEventFeed($query);
foreach ($feed as $entry) {
echo $entry->title . "\n";
}
----
On 7/1/07, cc_humbry <[EMAIL PROTECTED]> wrote:
>
>
> a further update to this is that even if I update the event using the
> Calendar UI and save it, the event still isn't found using the api.
> Thanks
> Conrad
>
> On 30 Jun, 22:15, Trevor Johns <[EMAIL PROTECTED]> wrote:
> > On Jun 30, 7:09 am, cc_humbry <[EMAIL PROTECTED]> wrote:
> >
> >
> >
> > > Hi,
> > > I having difficulty in getting results from a full text event query
> > > search on searching event content.
> > > I have added events using the api and setting the content
> > > programatically. This is fine and I can see the created events in the
> > > calendar - including the content when I view the actual event from the
> > > link in the calendar. However, when I search using the same values for
> > > criteria that I have added to the event content thus...
> >
> > > $gdataCal = new Zend_Gdata_Calendar($this->getClient());
> > > $query = $gdataCal->newEventQuery();
> > > $query->setUser($this->user);
> > > $query->setVisibility('private');
> > > $query->setProjection('full');
> > > $query->setQuery($queryString);
> > > $eventFeed = $gdataCal->getCalendarEventFeed($query);
> >
> > > I don't get any results.
> > > Searching on other text that is in the title does work however. The
> > > api
> descriptionhttp://code.google.com/apis/calendar/developers_guide_php.html#Retrie...
> > > states "A full-text query searches both the title and content of an
> > > event" so anyone know why this doesn't work???
> > > (a search on the same criteria using the standard calendar search does
> > > find these documents).
> >
> > > Thanks
> > > Conrad
> >
> > Hi Conrad,
> > The code you posted looks correct to me. Just out of curiosity, have
> > you tried running the full text query using the calendar sample code
> > (http://framework.zend.com/svn/framework/trunk/demos/Zend/Gdata/
> > Calendar.php)? If so, do you get similar results?
> >
> > Also, does it make a difference if you create the events using the
> > normal Google Calendar UI? Try creating something simple, like an
> > event with a one word title and description and see if that makes a
> > difference.
> >
> > Finally, make sure you're searching for exactally the word that
> > appears in the description. For instance, if your description contains
> > the word "apple" make sure you aren't searching for "apples" since it
> > considers the two to be different words.
> >
> > Let me know what you come up with and we'll go from there.
> >
> > --
> > Trevor Johnshttp://tjohns.net
>
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google Calendar Data API" group.
To post to this group, send email to
[email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/google-calendar-help-dataapi?hl=en
-~----------~----~----~----~------~----~------~--~---