I spent far, FAR too much time working on getting FTS to work in 7.6.03 - and 
it never was stable.  It would stay up for a few weeks at most and then we'd 
have to re-index.  From what you've said it sounds like it is hung.

Part of our problem was tied to using a server group and virtual servers.   
Anyway, I got REALLY good at the restart procedure.

To restart:


1.       Disable FTS Indexing on your server(s)

2.       Disable Full Text Searching on your server(s)

3.       Shut down your AR Server.  If you have more than one ar server shut 
them all down.

4.       Using your favorite sql tool - delete * from FT_PENDING

5.       Delete ALL files from the FT Collection directory

6.       Restart the server - if you are in a server group only restart the 
server who is #1 in the Operartion Ranking form for FTS

7.       Uncheck the "Disable FTS Indexer" and hit "Reindex" and then Apply/OK

8.       Check the index directory - make sure it is building files.  Often 
times when it failed on us it was within the first 5 minutes.

9.       Restart other servers if applicable

10.   Keep checking the AR Server Admin Form/FTS tab - when the "Reindex" box 
has cleared itself turn off "Disable Full Text Searching" (aka, turn it back on)

Good luck....

From: Action Request System discussion list(ARSList) 
[mailto:[email protected]] On Behalf Of Curtis Gallant
Sent: Tuesday, May 28, 2013 2:23 PM
To: [email protected]
Subject: Re: how to identify FTS-indexed fields from the DB?

**
I just took a quick look again and the query needs a slight tweak, on the DB it 
will store other possible values in the fullTextOptions if some of the other 
FTS options are selected, like "Literal FTS Index".  So instead of = '1' you 
should use > 0.

select schemaId, fieldId from field_char where fullTextOptions > 0
UNION
select schemaId, fieldId from field_diary where fullTextOptions > 0
UNION
select schemaId, fieldId from field_attach where fullTextOptions > 0

On the API side, a slight change as well:

public static void getFTSIndexedFields() {
   try {
       List<String> schemaList = server.getListForm(0, 
Constants.AR_LIST_SCHEMA_ALL_WITH_DATA|Constants.AR_HIDDEN_INCREMENT);
       System.out.println("\"Schema Name\",\"Field Name\",\"Field ID\"");
       for (String schema : schemaList) {
           List<Field> schemaFields = server.getListFieldObjects(schema, 
Constants.AR_FIELD_TYPE_DATA);
           for (Field field : schemaFields) {
               FieldLimit fLimit = field.getFieldLimit();
               if (fLimit != null) {
                   if (fLimit.getDataType() == Constants.AR_DATA_TYPE_CHAR) {
                       if (((CharacterFieldLimit)fLimit).getFullTextOption() > 
Constants.AR_FULLTEXT_OPTIONS_NONE) {
                           System.out.println("\"" + schema + "\"," + "\"" + 
field.getName() + "\"," + "\"" + field.getFieldID() + "\"");
                       }
                   }
                   else if (fLimit.getDataType() == 
Constants.AR_DATA_TYPE_DIARY) {
                       if (((DiaryFieldLimit)fLimit).getFullTextOption() > 
Constants.AR_FULLTEXT_OPTIONS_NONE) {
                           System.out.println("\"" + schema + "\"," + "\"" + 
field.getName() + "\"," + "\"" + field.getFieldID() + "\"");
                       }
                   }
                   else if (fLimit.getDataType() == 
Constants.AR_DATA_TYPE_ATTACH ) {
                       if (((AttachmentFieldLimit)fLimit).getFullTextOption() > 
Constants.AR_FULLTEXT_OPTIONS_NONE) {
                           System.out.println("\"" + schema + "\"," + "\"" + 
field.getName() + "\"," + "\"" + field.getFieldID() + "\"");
                       }
                   }
               }
           }
       }
   } catch (ARException e) {
       System.out.println(e.getMessage());
   }
}

On Tue, May 28, 2013 at 3:07 PM, Andrew Hicox 
<[email protected]<mailto:[email protected]>> wrote:
**

EXCELLENT, dude! That's exactly what I was looking for.
Rock on!

thanks again,

-Andy


On May 28, 2013, at 1:57 PM, Curtis Gallant wrote:


**
While you've gotten some direction with FT_Pending which is good, to answer 
your original question on a query for seeing what fields are currently set to 
be indexed (full list)... you simply look to see what fields have FTS attribute 
set.  FTS will work against character, diary and attachment fields so you just 
need to query those field_* tables and see where the fullTextOptions is set to 
'1'.

e.g.

select schemaId, fieldId from field_char where fullTextOptions = '1'
UNION
select schemaId, fieldId from field_diary where fullTextOptions = '1'
UNION
select schemaId, fieldId from field_attach where fullTextOptions = '1'

If you want to use that to pull in field names and form names you can easily 
build out the query to pull that in with the info provided by also querying the 
field table and arschema table.

Hope this helps.

Also, to get at this info via Java API, you could have a method that looks 
something this to give a CSV style output of "Form Name","Field Name","Field 
ID":

public static void getFTSIndexedFields() {
   try {
       List<String> schemaList = server.getListForm(0, 
Constants.AR_LIST_SCHEMA_ALL_WITH_DATA|Constants.AR_HIDDEN_INCREMENT);
       System.out.println("\"Schema Name\",\"Field Name\",\"Field ID\"");
       for (String schema : schemaList) {
           List<Field> schemaFields = server.getListFieldObjects(schema, 
Constants.AR_FIELD_TYPE_DATA);
           for (Field field : schemaFields) {
               FieldLimit fLimit = field.getFieldLimit();
               if (fLimit != null) {
                   if (fLimit.getDataType() == Constants.AR_DATA_TYPE_CHAR) {
                       if (((CharacterFieldLimit)fLimit).getFullTextOption() == 
1) {
                           System.out.println("\"" + schema + "\"," + "\"" + 
field.getName() + "\"," + "\"" + field.getFieldID() + "\"");
                       }
                   }
                   else if (fLimit.getDataType() == 
Constants.AR_DATA_TYPE_DIARY) {
                       if (((DiaryFieldLimit)fLimit).getFullTextOption() == 1) {
                           System.out.println("\"" + schema + "\"," + "\"" + 
field.getName() + "\"," + "\"" + field.getFieldID() + "\"");
                       }
                   }
                   else if (fLimit.getDataType() == 
Constants.AR_DATA_TYPE_ATTACH ) {
                       if (((AttachmentFieldLimit)fLimit).getFullTextOption() 
== 1) {
                           System.out.println("\"" + schema + "\"," + "\"" + 
field.getName() + "\"," + "\"" + field.getFieldID() + "\"");
                       }
                   }
               }
           }
       }
   } catch (ARException e) {
       System.out.println(e.getMessage());
   }
}



Cheers,

On Tue, May 28, 2013 at 1:43 PM, Andrew Hicox 
<[email protected]<mailto:[email protected]>> wrote:
Hello everyone,

I currently find myself in the third circle of ARS hell ... debugging FTS on 
ARS 7.6.03 (it's a long story on why we're not on 7.6.04 yet, but suffice it to 
say, I have no immediate control of that situation).

We have had an FTS re-index procedure running for more than a month now. I need 
to get an idea on where it is, and how much longer it needs to finish. I can 
trace some of this through the arftsindex.log(s). It seems to iterate per-form, 
per-indexed field. So ... form A, indexed field 1 ... then indexed field 2, 
etc, etc cycling through every record in the form N times where N is the number 
of indexed columns in the form.

So ... part of this is that I need to be able to know exactly how many such 
fields and forms I'm looking at.
I need a better way of doing this than to open each form on the server, and 
pick through the field properties on every form.

I've tried running the sql log on server startup to try and capture whatever it 
is the ft dispatcher executes in the DB to find the indexed fields, but if it's 
there I sure as heck can't find it. There do not appear to be any obvious 
columns on the 'FIELD' table that would indicate FTS indexing mode, nor do 
there appear to be any adjunct tables (like the various FIELD_* tables) that 
would contain this data.

I'd like very much to be able to execute a query on the DB that would return 
schemaid and fieldid of all the fields that the FTS indexer is going to try and 
run through.

Does anyone know of a way to do this?

-Andy
_______________________________________________________________________________
UNSUBSCRIBE or access ARSlist Archives at 
www.arslist.org<http://www.arslist.org/>
"Where the Answers Are, and have been for 20 years"



--
:wq cuga
_ARSlist: "Where the Answers Are" and have been for 20 years_

_ARSlist: "Where the Answers Are" and have been for 20 years_



--
:wq cuga
_ARSlist: "Where the Answers Are" and have been for 20 years_
________________________________
No virus found in this message.
Checked by AVG - www.avg.com<http://www.avg.com>
Version: 2013.0.3343 / Virus Database: 3162/6343 - Release Date: 05/21/13
Internal Virus Database is out of date.

_______________________________________________________________________________
UNSUBSCRIBE or access ARSlist Archives at www.arslist.org
"Where the Answers Are, and have been for 20 years"

Reply via email to