Using lucene 5.4.1 I am trying to use the AnalyzingInfixSuggester to build a suggestion library and I'm running into an issue where I am unable to load that suggester. I have one process that builds an index out of my data and I have another process(web service) that returns data by searching against that index. However, when I try to open the index, I get nothing from suggester.getCount()
I am calling commit() on my suggester after writing to the directory. On the file system, the files in the directory in question contain about 5.8M of data. However, when I open it to make a search from the web service, I get nothing. I tried calling build and refresh just in case I needed to do that to initialize and still get nothing.
I feel like I'm missing something. Can someone please point me in the direction of some example code that actually reads the suggestion documents from a file system directory?
The answer was much simpler than I thought. A compound of forgetting that my index was built on my machine while the service was running on a vagrant instance. Wrote to a shared directory, removed calls to refresh and build and it works. So to recap, all that is necessary is to construct the suggester by passing the directory and analyzer and it works as expected.
Related
How can I execute a three.js example in my project folder? The example I want to execute is this:
https://threejs.org/examples/webgl_animation_keyframes.html
.
After installing three.js through npm, I copied example's source code:
https://github.com/mrdoob/three.js/blob/master/examples/webgl_animation_keyframes.html
in my empty examples folder located at '/node_modules/three/examples'.
I think there's a path direction problem importing some of including library files such as
"import { RoomEnvironment } from './jsm/environments/RoomEnvironment.js';"
"loader.load( 'models/gltf/LittlestTokyo.glb', function ( gltf )"
etc.
Do I have to copy those library files and paste it on the right path by hand? I'm afraid this is not a correct solution. Is there a solution something like, as I wish, downloading all necessary library files in the right places by input some npm command?
The situation is certainly not ideal, but here are some tips:
You can clone the whole repository so you have all the resources used by the examples: git clone --depth=1 https://github.com/mrdoob/three.js.git
You can use a web browser's web page saving feature (Ctrl+S) but be sure to replace the HTML with the example's source HTML, because it will be much cleaner. You'll need to fix up file path references, and it may still miss some resources. Also make sure not to get the iframe containing page, but rather the demo itself.
If Save Webpage As misses some resources, you can use Chrome's dev tools Network tab. Refresh the page to populate it, then right click inside the table > Copy > Copy All as CURL. This will give you a command you can paste in your terminal (in an empty directory, ideally) to download all the resources used by the webpage. This can still miss some resources that are dynamically loaded, such as with 1. the model selector in the LDraw Loader example, in which case you could switch to each model to purposely populate the network requests table, or 2. a fallback for older browsers, in which case you may not be able to get it through this method.
It's much easier to remove features than to add and combine them, so try to find an example that uses as many of the things you want as possible (without being overwhelmingly complex). It's worth looking outside of the official examples to real projects and third party experiments. Just note that they may not be up to date with the latest APIs.
I hope someone writes a script to automate setting up a Three.js project from an example... and posts a better answer than this!
When attempting to install a program as a known image, instally hangs, there is no response, control Y fails and the only way out is to stop the process.
install create logical_path:program.exe/header
Program and subroutines are compiled nodebug and it is linked notraceback.
Logical path is in lnm$system. Directory is owned by system, and has protection rwe,rwe,re,re. program.exe has protection rwed,rwed,re,re. I think the problem lies with program.exe, but what ? There must be a simple explanation. BTW, am logged in as system, with cmknl set.
Many thanks in advance.
I can't comment, so asking as an "answer" (site rule - admins delete this if you want) - installing an image requires free global sections. Not sure why it would ever "hang" trying to do that, but that's the only thing I can think of that would prevent the INSTALL from not working.
Suggest checking free global sections and free global pages.
Well ... its a loooong time ago but it could be the actual name of your exe! I remember a customer problem where they installed a program of their own called ... 'install.exe'. Boy did VMS get its knickers in a twist over that!! So try 'myprogram.exe' instead of 'program.exe' The other reason may be because you shouldn't install a program called abc.exe if abc.exe is already installed. This is because the second abc.exe cannot replace the first abc.exe until the first abc.exe has released all its channels. And if someone is running (the first) abc.exe, or has it open for some other reason, then the install of the second abc.exe won't complete. VMS (because it is a properly written O/S) loves to do things 'in order'. Hope this helps
I need to start an external process (which is around 300MB large on its own) several times using System.Diagnostics.Process.
The only problem is: once the first instance starts, it generates temporary data in its base folder (where the application is located), so I can't just start another instance - it would corrupt the data of the first one and mess up everything.
I thought about temporarily copying the whole application folder programmatically, so that each instance has its own, but that doesn't feel right.
Could anybody help me out? Thanks in advance!
Try starting each copy in a different directory.
If the third-party app ignores the current directory, you could make a symlink to it in a different folder. I'm not necessarily recommending that, though.
Pass an argument to your external process that specifies the temp folder to use.
This is regarding my developmnent stage and the practice of testing all the JS before releasing it.
Unfortunatly we have some hardcoded references in our code. and this is the reason why there is no way for me to test a new version of test.js on the Stage server. and you only see the effects when it goes live.
Now, I know I should use relative paths etc.. but I was wondering if there is a Firefox plugin that could maybe substitute http://remote.site/test.js with /dev_path/to/test.js during pageload ?
I have also tried using hosts file for this purpose but it doesn't work in my scenario as I only need to map it to this 1 reference and not the whole domain.
Is there anything stopping you from changing the hard-coded references? That's really the easiest answer to your problem.
Run a find-and-replace on your files to replace the absolute links to relative ones. So long as the site hierarchy is the same for development and production, there shouldn't be any problems.
I'm trying to use the VssGet task of the MSBuild Community Tasks, and the error message "File or project not found" is beating me with a stick. I can't figure out what in particular the error message is referring to. Here's the task:
<LocalFilePath Include="C:\Documents and Settings\michaelc\My Documents\Visual Studio 2005\Projects\Astronom\Astronom.sln" />
<VssGet DatabasePath="\\ofmapoly003\Individual\michaelc\VSS\Astronom_VSS\srcsafe.ini"
Path="$/Astronom_VSS"
LocalPath="#(LocalFilePath)"
UserName="build" Password="build"
Recursive="True" />
If I write a Streamreader to read to either the database path or the local path, it succeeds fine. So the path to everything appears to be accessible. Any ideas?
Two thoughts. One, sometimes a type load exception manifests as a FNF - let's hope that's not it. But if the code is actually being honest, you can track the problem using Procmon or Filemon. Start one of those utilities and then run your task again. You should be able to track down a record of a file that couldn't be located.
#famoushamsandwich that's a great response -- I had not previously heard of procmon or filemon. Tried procmon on the problem, but even after sifting through the relevant output (my gosh the machine does a lot more stuff behind the screen than I was aware of) I couldn't find where a file I'm referencing wasn't being found.
Procmon and Filemon are good suggestions - just make sure you filter the results to only show errors. Otherwise the success messages will bury the problem entries. Also, you can filter out processes that are not at fault (either through the filter dialog or by right-clicking the entry and choosing "Exclude Process".)
A couple other thoughts:
In the LocalFilePath, you are specifying a single file as opposed to a folder. The task, on the other hand, specifies to get files recursively. Perhaps you need to remove "\Astronom.sln" from the LocalFilePath?
Is the build task being run under your account or another? It's possible you have a permissions issue
Do you already have a copy of the code pulled down in the same location? Perhaps there is a failure to overwrite an existing file/folder?