Error: Index does not exist. (No such file or directory) – UPDATE

This is a follow up article to Error: Index does not exist. (No such file or directory)

Over the past days, I worked with HCL support to find out what causes the issue. With help from the extended support team we finally found the answer.

In my test environment I have an application that stores order data in 250k documents. If the application has no FT index, I can run an agent to find all orders that have a quantity below 30.

	public void sample1(){
		Instant start = null;
		Instant finish = null;
		
		DocumentCollection coll = null;
		DominoQuery dql1 = null;

		try {
			dql1 = order2018.createDominoQuery();
			dql1.setMaxScanDocs(Integer.MAX_VALUE);
			dql1.setMaxScanEntries(Integer.MAX_VALUE);

			String query = "quantity < 30";
			
			start = Instant.now();
			coll = dql1.execute(query, "named_java_rslt_1",true,24);
			finish = Instant.now();
			System.out.println(String.format("%s found %d results in %d msec.", query, coll.getCount(),
					Duration.between(start, finish).toMillis()));
			
			
		} catch (NotesException e) {
			e.printStackTrace();
		} 
	}

When I run the code, I get

[212C:051A-32D0] 06.04.2022 07:33:01   AMgr: Start executing agent 'java.test' in 'orders\dql.nsf'
[212C:051C-30E8] 06.04.2022 07:33:15   Success: overwriting named foundset "named_java_rslt_1"
[212C:051C-30E8] 06.04.2022 07:33:15   Agent Manager: Agent printing: quantity < 30 found 724 results in 14000 msec.
[212C:051A-32D0] 06.04.2022 07:33:15   AMgr: Agent 'java.test' in 'orders\dql.nsf' completed execution

To speed up things a bit, I then created a FT index. I used the new feature in Domino V12 to exclude specific items to keep the index as small as possible. I was only interested in filtering by quantity. So I disabled index creation for all $ items as well as all items except quantity.

The index was created without issues.

[2AAC:0005-2474] FTGIndex: Finished: 0 ms. for [h:\orders\2018.ft] 
[2AAC:0005-2474] 250000 documents added, 0 updated, 0 deleted: 0 text bytes; 8000000 numeric bytes for [h:\orders\2018.ft]
[2AAC:0005-2474] FTGIndex: All Done: 1108 ms for [h:\orders\2018.ft]
[2AAC:0005-2474]  OUT FTGIndex rc = 0 (No error) - for [h:\orders\2018.ft]

When I now run the agent I get

[212C:0520-1FD0] 06.04.2022 07:46:47   AMgr: Start executing agent 'java.test' in 'orders\dql.nsf'
[212C:0522-2328] 06.04.2022 07:46:47   Full Text message: Index does not exist. (No such file or directory)
[212C:0522-2328] 06.04.2022 07:46:47   GTR search error for "h:\orders\2018.ft\ftgi": Index does not exist.: Full text index not found for this database
[212C:0522-2328] 06.04.2022 07:46:47   Agent Manager: Agent  error: NotesException: Domino Query execution error:   Full text index not found for this database -  error during planning and tree generation     quantity < 30   (Call hint: FTCalls::FTSearchExt, Core call #0
)   ****************** 
[212C:0522-2328] 06.04.2022 07:46:47   Agent Manager: Agent  error:  at lotus.domino.local.DominoQuery.execute(Unknown Source)
[212C:0522-2328] 06.04.2022 07:46:47   Agent Manager: Agent  error:  at de.eknori.DQLTest.sample1(DQLTest.java:50)
[212C:0522-2328] 06.04.2022 07:46:47   Agent Manager: Agent  error:  at JavaAgent.NotesMain(Unknown Source)
[212C:0522-2328] 06.04.2022 07:46:47   Agent Manager: Agent  error:  at lotus.domino.AgentBase.runNotes(Unknown Source)
[212C:0522-2328] 06.04.2022 07:46:47   Agent Manager: Agent  error:  at lotus.domino.NotesThread.run(Unknown Source)
[212C:0520-1FD0] 06.04.2022 07:46:47   AMgr: Agent 'java.test' in 'orders\dql.nsf' completed execution

And here is WHY. There wasn’t a single piece of text indexed. That is because the field quantity is not a “text” field. It is a NUMBER field an that goes into a different index and would not be in FullMain.

I changed the Full Text Index Rules to include at least on TEXT item.

and re-created the index

[2AAC:0005-2474] FTGIndex: Finished: 0 ms. for [h:\orders\2018.ft] 
[2AAC:0005-2474] 250000 documents added, 0 updated, 0 deleted: 1500000 text bytes; 8000000 numeric bytes for [h:\orders\2018.ft]
[2AAC:0005-2474] FTGIndex: All Done: 1087 ms for [h:\orders\2018.ft]
[2AAC:0005-2474]  OUT FTGIndex rc = 0 (No error) - for [h:\orders\2018.ft]

As you can see, we now have a FULLMAIN folder under ftgi.

When I now run my agent, everything works fine

[212C:0526-3348] 06.04.2022 07:52:48   AMgr: Start executing agent 'java.test' in 'orders\dql.nsf'
[212C:0528-0914] 06.04.2022 07:52:48   Success: overwriting named foundset "named_java_rslt_1"
[212C:0528-0914] 06.04.2022 07:52:48   Agent Manager: Agent printing: quantity < 30 found 724 results in 234 msec.
[212C:0526-3348] 06.04.2022 07:52:48   AMgr: Agent 'java.test' in 'orders\dql.nsf' completed execution

One thought on “Error: Index does not exist. (No such file or directory) – UPDATE

  1. sir,can the dsapi function ‘AddInLogMessageText’ output color font to console?
    if it can do ,how to do, thanks.

Comments are closed.