search by description like goolge

140 views
Skip to first unread message

Luengo Sergio

unread,
Jan 3, 2022, 5:26:30 AM1/3/22
to harbou...@googlegroups.com
Hello good day.
I ask another question.
They know if there is any function for the search by description no matter where the word is located, as if it were google.
Thanks a lot

 

 

              Sergio Luengo

       General Pico La Pampa  

         Analista de Sistemas

 

De: harbou...@googlegroups.com [mailto:harbou...@googlegroups.com] En nombre de fdaniele
Enviado el: sábado, 1 de enero de 2022 21:30
Para: Harbour Users <harbou...@googlegroups.com>
Asunto: [harbour-users] Re: api google sheets

 

No one?

 

Il giorno giovedì 30 dicembre 2021 alle 11:07:07 UTC+1 fdaniele ha scritto:

Good morning and happy new year.

 

someone knows how we can read/write a google sheets ?

 

via api? someone have experiences? 

 

thanks 

Daniele

 

--
--
You received this message because you are subscribed to the Google
Groups "Harbour Users" group.
Unsubscribe: harbour-user...@googlegroups.com
Web: http://groups.google.com/group/harbour-users

---
You received this message because you are subscribed to the Google Groups "Harbour Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to harbour-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/harbour-users/04def4cd-f80b-496b-b8c7-204101c32acan%40googlegroups.com.

image001.png

Rafa Pabd

unread,
Jan 3, 2022, 12:18:39 PM1/3/22
to Harbour Users
Try OrdWildSeek()

Auge & Ohr

unread,
Jan 4, 2022, 12:02:21 AM1/4/22
to Harbour Users
hi,

OrdWildSeek() need a Index, but LEN of IndexKey() is limited
in xBase you can use $ to search a Part in a String

  "B" $ "ABC"

or using SQL

   cText += ::cFeld + " LIKE " + "'%" + TRIM( ::cSLE ) + "%'"

---

to use a "Full-Text-Search" like in SixDrive you need a Index of "every Word" in Text File.
under Xbase++ you create a "Custom Index" and manual add "Keyword" to Index.

! Note : Indexkey() MUST have same length !

but that FTS Concept need a lot of Work and Index Size will be very big

Jimmy

Yakano

unread,
Jan 4, 2022, 3:30:40 AM1/4/22
to Harbour Users
Hi

I'll try "INDEX ON .. FOR &(cCondition)" or even better in memory... "INDEX ON &(cIndexKey) TAG _TEMP_ TO tHarbourt FOR &(cCondicion) ADDITIVE MEMORY" where...

cIndexKey := IndexKey() or whatever
cCondition can be a call to a function that makes the "B" $ "ABC" that Jimmy said, using Rec2Chr(). Something like...

FUNCTION  Rec2Chr (cDelim)  // devuelve el registro como caracteres [ft_XtoY|hb_CStr] se pueden usar
Local cStr:='~'
   cDelim := Iif(Empty(cDelim), '~', ft_XtoY(cDelim,'C'))
   aEval(dbStruct(), {|x,i| cStr+=AllTrim(ft_XtoY(FieldGet(i),'C'))+cDelim})
return(cStr)

No problem with "Len" in FOR clause as you can read here in this post...

When there is more than one word in your query, you can use space to separate words to find using Token*() functions or, even, if you teach your users to use of "HashTags", you can find something lilke "#A B #C", if some field of your rec has "A B" [and | or] "C" on it... of course [and|or] is your user choice.

This is working for me with succes for several years...

Regards

jb

unread,
Jan 4, 2022, 6:02:57 AM1/4/22
to Harbour Users
you can customize the attached program. It searches whole table (all fields). The idea: open a dbf file as a regular file, load a block (many records), the buffer is searched for the string, each success is associated with a computed recno, and all records containing the string are displayed at the end.

Dne úterý 4. ledna 2022 v 9:30:40 UTC+1 uživatel Yakano napsal:
searchdb.prg

Luengo Sergio

unread,
Jan 4, 2022, 8:19:34 AM1/4/22
to harbou...@googlegroups.com

Hello. Good morning.

 

What I forgot to specify in the above post is that I use mysql (not dbf)

And the search I need to make it work in mysql

 

Thank you so much

 

 

 

              Sergio Luengo

       General Pico La Pampa  

         Analista de Sistemas

 

image001.png

jb

unread,
Jan 4, 2022, 8:42:05 AM1/4/22
to Harbour Users
Then it's not a question for Harbour, it's a question for SQL. Please also specify an example of what you would like to search for and find.

Dne úterý 4. ledna 2022 v 14:19:34 UTC+1 uživatel system...@gmail.com napsal:

Victor Casajuana Mas

unread,
Jan 5, 2022, 4:06:11 AM1/5/22
to Harbour Users
Hello.

If you use mysql, can select MATCH AGAINST

Reply all
Reply to author
Forward
0 new messages