Search Results

Search found 1941 results on 78 pages for 'zend lucene'.

Page 12/78 | < Previous Page | 8 9 10 11 12 13 14 15 16 17 18 19  | Next Page >

  • Media RSS and Zend

    - by user303774
    Hi, I have a Magento application running atop Zend framework. I like to generate Media RSS feed in Zend (In orded to feed the Cooliris application). Does anyone know if Zend framework supports Media RSS feed? (I didn't find anything in http://framework.zend.com/manual/1.10/en/zend.feed.html, but maybe I dint look in the right place?) Tx, Sty

    Read the article

  • Render view in higher script path with Zend Framework

    - by sander
    Lets assume the following code within a controller: $this->view->addScriptPath('dir1/views/scripts'); $this->view->addScriptPath('dir2/views/scripts'); $this->render('index.phtml'); Where dir1/views/scripts contains 2 files: -index.phtml -table.phtml And dir2/views/scripts: -table.phtml Now, it will render the index.phtml in dir1 since dir 2 doesn't have an index.phtml. Index.phtml looks something like: <somehtml> <?= $this->render('table.phtml') ?> </somehtml> This is where the confusion starts for me. I would expect it to render the table.phtml in the last directory added to the script path stack, but it doesn't. Is there a simple solution/explanation to my problem?

    Read the article

  • Zend Framework Db Select Join table help

    - by tester2001
    I have this query: SELECT g.title, g.asin, g.platform_id, r.rank FROM games g INNER JOIN ranks r ON ( g.id = r.game_id ) ORDER BY r.rank DESC LIMIT 5` Now, this is my JOIN using Zend_Db_Select but it gives me array error $query = $this-select(); $query-from(array('g' = 'games'), array()); $query-join(array('r' = 'ranks'), 'g.id = r.game_id', array('g.title', 'g.asin', 'g.platform_id', 'r.rank')); $query-order('r.rank DESC'); $query-limit($top); $resultRows = $this-fetchAll($query); return $resultRows; Anyone know what I could be doing wrong? I want to get all the columns in 'games' to show and the 'rank' column in the ranks table.

    Read the article

  • Zend Framework AjaxContext filters the results and Decorators not removable

    - by Janis Peisenieks
    Ok, since this problem has 2 parts, it will be easier to explain them together. So here goes: I am trying to remove the default decorators from these elements, since I am using a little different way of styling them. But no matter what i do, the DtDDWrapper still shows up. If I try to remove all of the decorators, all of the fields below disappear. public function newfieldAction() { $ajaxContext = $this->_helper->getHelper('AjaxContext'); $ajaxContext->addActionContext('newfield', 'html')->initContext(); $id = $this->_getParam('id', null); $id1=$id+1; $id2=$id+2; $element = new Zend_Form_Element_Text("newTitle$id1"); $element->setOptions(array('escape'=>false)); $element->setRequired(true)->setLabel('Vertiba')->removeDecorator('label'); $tinyelement=new Zend_Form_Element_Text("newName$id"); $tinyelement->setRequired(true)->setOptions(array('escape'=>false))->setLabel('Vertiba')->removeDecorator('label'); $textarea_element = new Zend_Form_Element_Textarea("newText$id2"); $textarea_element->setRequired(true)->setOptions(array('escape'=>false))->setLabel('Vertiba')->removeDecorator('label'); $this->view->descriptionField = "<td>".$textarea_element->__toString()."</td>"; $this->view->titleField = $element->__toString(); $this->view->field = $tinyelement->__toString(); $this->view->id=$id; } The context view script seams to trim my code in one way or another. When I try to put a <td> or a <table> tag in the view script, it just skips the tags. Is there a way to stop this escaping from happening? My view script: id; ?" asdfasdfasdfasd field ? titleField ? descriptionField ? id ?"remove P.S. the code formatting system is barfing at me, could someone please help me with the formatting of the code?

    Read the article

  • [Zend Framework] How to format Zend_db Rowset output?

    - by rasouza
    I have a model which is referenced to a table registries extending Zend_Db and some methods which bascially uses fetchAll() all the time. What happens is: my table has a DATE field and I'd like it to output already formated when I call $row-reg_date. Is it possible by doing something in the model or do I have to manually format?

    Read the article

  • Zend Database Adapter - Complex MySQL Query

    - by Sonny
    I have defined a function in my Navigation model that executes a query, and I was wondering if there's a more "Zendy" way of generating/executing the query. The query I'm using was proposed by Bill Karwin on another thread here for setting arbitrary record order. I tried using a prepared statement, but the values in the SIGN() function got quoted. I'm using the PDO adapter for MySQL. /** * */ public function setPosition($parentId, $oldPosition, $newPosition) { $parentId = intval($parentId); $oldPosition = intval($oldPosition); $newPosition = intval($newPosition); $this->getAdapter()->query(" UPDATE `navigation` SET `position` = CASE `position` WHEN $oldPosition THEN $newPosition ELSE `position` + SIGN($oldPosition - $newPosition) END WHERE `parent_id` = $parentId AND `position` BETWEEN LEAST($oldPosition, $newPosition) AND GREATEST($oldPosition, $newPosition) "); return $this; }

    Read the article

  • Zend Framework: How to display multiple actions, each requiring different authorizations levels, on

    - by Iain
    Imagine I have 4 database tables, and an interface that presents forms for the management of the data in each of these tables on a single webpage (using the accordion design pattern to show only one form at a time). Each form is displayed with a list of rows in the table, allowing the user to insert a new row or select a row to edit or delete. AJAX is then used to send the request to the server. A different set of forms must be displayed to different users, based on the application ACL. My question is: In terms of controllers, actions, views, and layouts, what is the best architecture for this interface? For example, so far I have a controller with add, edit and delete actions for each table. There is an indexAction for each, but it's an empty function. I've also extended Zend_Form for each table. To display the forms, I then in the IndexController pass the Forms to it's view, and echo each form. Javascript then takes care of populating the form and sending requests to the appropraite add/edit/delete action of the appropriate controller. This however doesn't allow for ACL to control the display or not of Forms to different users. Would it be better to have the indexAction instantiate the form, and then use something like $this-render(); to render each view within the view of the indexAction of the IndexController? Would ACL then prevent certain views from being rendered? Cheers.

    Read the article

  • zend one controller many views

    - by Sherif
    hi there when i build my web site it was handling only one interface but now i need to handle many interface i can detect which site to communicate and isolate it from other sites but i stuck with this : all the sites have the same views ... is there are a way so i can rander from the same controller different views .. something like application application controller model site_1_view site_2_view is this possible ??!!

    Read the article

  • Jquery/JavaScript's role in MVC (zend)

    - by user7543288
    I have my doubts if this question should have went into the programmers.stackexchange.com or not…but I would like to ask all you experienced developers out there, how do you see the connection that jquery - javascript has with the MVC. How would you explain it to a n00b? does it bridge the communication between the View and the Controller? or what? I have done my research and I believe this is the best article explaining it http://www.alistapart.com/articles/javascript-mvc/ but I would like to hear your point of view..

    Read the article

  • session set for some Actions in Zend framework

    - by user202127
    I'm working on a website , in CV part users have some articles that only logged in users can download them.I want to make changes to the log in Action or preDispatch() to set session for guess users to download the articles, can some one tell me how it can be or give me some reference links. here is my preDispatch(): public function preDispatch() { $userInfo=$this->_auth->getStorage()->read(); $identity= $this->_auth->getIdentity(); if(!$this->_auth->hasIdentity()) { return $this->_helper->redirector('login','login'); } if(!isset($userInfo["member_id"]) || strlen($userInfo["member_id"])==0) { return $this->_helper->redirector('forbidden','login'); } $this->_accessType=2; }

    Read the article

  • How to style forms in the Zend framework?

    - by user505988
    Hi, I really like the idea of putting forms into a seperate class that manages validation etc, but I don't like everything ending up in a DL and also not being able to use square bracket notation in post elements like <input type='checkbox' name='data[]'>. Is there another way of generating forms - like in views so I can style them the way I want, but also keeping the validation aspect? Also how would I load this view into my current view (using partial view somehow?)

    Read the article

  • Making a zend routes default paramaters display in the URL

    - by NaNuk
    I have a route defined as below. $route['manage-vehicles'] = new Zend_Controller_Router_Route( 'vehicles/manage/page/:page', array( 'controller' => 'vehicles', 'action' => 'manage', 'page' => '1' ) ); When the 'page' parameter is not specifically defined (e.g. in a menu constructed using the navigation component), the resultant URL is /vehicles/manage/page I would much prefer or the URL not to to display the default paramater key in this scenario i.e. /vehicles/manage Any ideas how to accomplish this would be appreciated? Thanks.

    Read the article

  • Zend Framework 1.1 Modules setup

    - by jiewmeng
    i used zend_tool to setup a project then to create module blog with index controller etc but i guess the default config setup by zend_tool does not work with modules so i edited it resources.frontController.moduleDirectory = APPLICATION_PATH "/modules" resources.frontController.moduleDirectoryControllerName = "controllers" i guess these are required for modules? also i moved the folders, controllers, models, views into the modules/ folder but i get a blank screen when i try to go to http://servername which shld load Default module's index controller and action. even if i try to go http://servername/nonexistentpage it also shows a blank screen instead of a 404

    Read the article

  • Zend_Search_Lucene vs SOLR

    - by spacemonkey
    Hi, I have recenlty stumbled into Zend Lucene port of Lucene project. I have a little bit experience with SOLR so I would like to know what is the difference between two of them especially from performance and installation side. As much as I know SOLR requires Tomcat serverlet running in web hosting in order to work, what about Zend Lucene library? I am also a bit confused what means "being implemented on the top of Lucene"?

    Read the article

  • Tokenizing Twitter Posts in Lucene

    - by Amaç Herdagdelen
    Hello, My question in a nutshell: Does anyone know of a TwitterAnalyzer or TwitterTokenizer for Lucene? More detailed version: I want to index a number of tweets in Lucene and keep the terms like @user or #hashtag intact. StandardTokenizer does not work because it discards the punctuation (but it does other useful stuff like keeping domain names, email addresses or recognizing acronyms). How can I have an analyzer which does everything StandardTokenizer does but does not touch terms like @user and #hashtag? My current solution is to preprocess the tweet text before feeding it into the analyzer and replace the characters by other alphanumeric strings. For example, String newText = newText.replaceAll("#", "hashtag"); newText = newText.replaceAll("@", "addresstag"); Unfortunately this method breaks legitimate email addresses but I can live with that. Does that approach make sense? Thanks in advance! Amaç

    Read the article

  • Lucene Error While Reading binary block : java.io.EOFException

    - by tushar Khairnar
    Hi, I am getting java.io.EOFException while reading a binary block from lucene index. I am storing java object as byte-array in lucene index field and reading it when hit occurs. Here is stack trace : Caused by: java.io.EOFException at java.io.ObjectInputStream$PeekInputStream.readFully(ObjectInputStream.java:2281) at java.io.ObjectInputStream$BlockDataInputStream.readShort(ObjectInputStream.java:2750) at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:780) at java.io.ObjectInputStream.(ObjectInputStream.java:280) at org.terracotta.modules.searchable.util.SerializationUtil$OIS.(SerializationUtil.java:20) I have some background threads which write into index. But i buffer them and then write them at once like 1000. Occasionally I also issue optimize() on index. When I write, I am re-opening IndexReader. Does this is happening because of IndexReader re-opening call? Thanks. Regards Tushar

    Read the article

  • Lucene.NET search index approach

    - by Tim Peel
    Hi, I am trying to put together a test case for using Lucene.NET on one of our websites. I'd like to do the following: Index in a single unique id. Index across a comma delimitered string of terms or tags. For example. Item 1: Id = 1 Tags = Something,Separated-Term I will then be structuring the search so I can look for documents against tag i.e. tags:something OR tags:separate-term I need to maintain the exact term value in order to search against it. I have something running, and the search query is being parsed as expected, but I am not seeing any results. Here's some code. My parser (_luceneAnalyzer is passed into my indexing service): var parser = new QueryParser(Lucene.Net.Util.Version.LUCENE_CURRENT, "Tags", _luceneAnalyzer); parser.SetDefaultOperator(QueryParser.Operator.AND); return parser; My Lucene.NET document creation: var doc = new Document(); var id = new Field( "Id", NumericUtils.IntToPrefixCoded(indexObject.id), Field.Store.YES, Field.Index.NOT_ANALYZED, Field.TermVector.NO); var tags = new Field( "Tags", string.Join(",", indexObject.Tags.ToArray()), Field.Store.NO, Field.Index.ANALYZED, Field.TermVector.YES); doc.Add(id); doc.Add(tags); return doc; My search: var parser = BuildQueryParser(); var query = parser.Parse(searchQuery); var searcher = Searcher; TopDocs hits = searcher.Search(query, null, max); IList<SearchResult> result = new List<SearchResult>(); float scoreNorm = 1.0f / hits.GetMaxScore(); for (int i = 0; i < hits.scoreDocs.Length; i++) { float score = hits.scoreDocs[i].score * scoreNorm; result.Add(CreateSearchResult(searcher.Doc(hits.scoreDocs[i].doc), score)); } return result; I have two documents in my index, one with the tag "Something" and one with the tags "Something" and "Separated-Term". It's important for the - to remain in the terms as I want an exact match on the full value. When I search with "tags:Something" I do not get any results. Question What Analyzer should I be using to achieve the search index I am after? Are there any pointers for putting together a search such as this? Why is my current search not returning any results? Many thanks

    Read the article

  • Lucene numDocs and doqFreq on custom similarity class

    - by David A
    Hi All, im doing an aplication with Lucene (im a noob with it) and im facing some problems. My aplication uses the Lucene 2.4.0 library with a custom similaraty implementation (the jar is imported) In my app im calculating doqFreq and numDocs manually (im adding the values of all indexes and then i calculate a global value in order to use it on every query) and i want to use that values on a custom similarity implementation in order to calculate a new IDF. The problem is that I dont know how to use (or send) the new doqFreq and numDocs values from my app on that new similarty implementation as I dont want to change lucene´s code apart from this extra class. Any suggestions or examples? I read the docs but i dont now how to aproach this :s Thanks

    Read the article

  • Lucene Search for japanese characters

    - by Pranali Desai
    Hi All, I have implemented lucene for my application and it works very well unless you have introduced something like japanese characters. The problem is that if I have japanese string ?????????????? and I search with ? that is the first character than it works well whereas if I use more than one japanese character(????)in search token search fails and there is no document found. Are japanese characters supported in lucene? what are the settings to be done to get it working?

    Read the article

  • Get highest frequency terms from Lucene index

    - by Julia
    Hello! i need to extract terms with highest frequencies from several lucene indexes, to use them for some semantic analysis. So, I want to get maybe top 30 most occuring terms(still did not decide on threshold, i will analyze results) and their per-index counts. I am aware that I might lose some precision because of potentionally dropped duplicates, but for now, lets say i am ok with that. So for the proposed solutions, (needless to say maybe) speed is not important, since I would do static analysis, I would put accent on simplicity of implementation because im not so skilled with Lucene (not the programming guru too :/ ) and cant wrap my mind around many concepts of it.. I can not find any code samples from something similar, so all concrete advices (code, pseudocode, links to code samples...) I will apretiate very much!!! Thank you!

    Read the article

  • Exception when indexing text documents with Lucene, using SnowballAnalyzer for cleaning up

    - by Julia
    Hello!!! I am indexing the documents with Lucene and am trying to apply the SnowballAnalyzer for punctuation and stopword removal from text .. I keep getting the following error :( IllegalAccessError: tried to access method org.apache.lucene.analysis.Tokenizer.(Ljava/io/Reader;)V from class org.apache.lucene.analysis.snowball.SnowballAnalyzer Here is the code, I would very much appreciate help!!!! I am new with this.. public class Indexer { private Indexer(){}; private String[] stopWords = {....}; private String indexName; private IndexWriter iWriter; private static String FILES_TO_INDEX = "/Users/ssi/forindexing"; public static void main(String[] args) throws Exception { Indexer m = new Indexer(); m.index("./newindex"); } public void index(String indexName) throws Exception { this.indexName = indexName; final File docDir = new File(FILES_TO_INDEX); if(!docDir.exists() || !docDir.canRead()){ System.err.println("Something wrong... " + docDir.getPath()); System.exit(1); } Date start = new Date(); PerFieldAnalyzerWrapper analyzers = new PerFieldAnalyzerWrapper(new SimpleAnalyzer()); analyzers.addAnalyzer("text", new SnowballAnalyzer("English", stopWords)); Directory directory = FSDirectory.open(new File(this.indexName)); IndexWriter.MaxFieldLength maxLength = IndexWriter.MaxFieldLength.UNLIMITED; iWriter = new IndexWriter(directory, analyzers, true, maxLength); System.out.println("Indexing to dir..........." + indexName); if(docDir.isDirectory()){ File[] files = docDir.listFiles(); if(files != null){ for (int i = 0; i < files.length; i++) { try { indexDocument(files[i]); }catch (FileNotFoundException fnfe){ fnfe.printStackTrace(); } } } } System.out.println("Optimizing...... "); iWriter.optimize(); iWriter.close(); Date end = new Date(); System.out.println("Time to index was" + (end.getTime()-start.getTime()) + "miliseconds"); } private void indexDocument(File someDoc) throws IOException { Document doc = new Document(); Field name = new Field("name", someDoc.getName(), Field.Store.YES, Field.Index.ANALYZED); Field text = new Field("text", new FileReader(someDoc), Field.TermVector.WITH_POSITIONS_OFFSETS); doc.add(name); doc.add(text); iWriter.addDocument(doc); } }

    Read the article

  • Search Lucene with precise edit distances

    - by askullhead
    I would like to search a Lucene index with edit distances. For example, say, there is a document with a field FIRST_NAME; I want all documents with first names that are 1 edit distance away from, say, 'john'. I know that Lucene supports fuzzy searches (FIRST_NAME:john~) and takes a number between 0 and 1 to control the fuzziness. The problem (for me) is this number does not directly translate to an edit distance. And when the values in the documents are short strings (less than 3 characters) the fuzzy search has difficulty finding them. For example if there is a document with FIRST_NAME 'J' and I search for FIRST_NAME:I~0.0 I don't get anything back.

    Read the article

< Previous Page | 8 9 10 11 12 13 14 15 16 17 18 19  | Next Page >